From eb4201c3c7a9d3a9672da728e7ce12bbab94f4f0ed38c8a29974ffda43cc52c3 Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 12 Sep 2014 11:35:14 +0000 Subject: [PATCH] Accepting request 248948 from home:TheBlackCat:branches:devel:languages:python - Add Cython-fix-version-detection.patch This is a patch from upstream that restores version information whose removal is preventing several packages from correctly detecting Cython's presence. It is already merged upstream and so should be in the next release. Note that despite what upstream says, python-tables/python3-tables is NOT the only package affected by this, which is why the patch is going here instead of python-tables/python3-tables. python-bcolz/python3-bcolz is an example of another package affected. OBS-URL: https://build.opensuse.org/request/show/248948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=47 --- Cython-fix-version-detection.patch | 44 ++++++++++++++++++++++++++++++ python-Cython.changes | 15 ++++++++++ python-Cython.spec | 3 ++ 3 files changed, 62 insertions(+) create mode 100644 Cython-fix-version-detection.patch diff --git a/Cython-fix-version-detection.patch b/Cython-fix-version-detection.patch new file mode 100644 index 0000000..444498a --- /dev/null +++ b/Cython-fix-version-detection.patch @@ -0,0 +1,44 @@ +From: toddrme2178@gmail.com +Date: 2014-09-12 12:49:00 +0000 +Subject: Restore version information +References: https://github.com/PyTables/PyTables/issues/386 +Upstream: included + +Restore version information for Cython. +Despite what the upstream header says, python-tables/python3-tables is NOT +the only package affected by this. + + +Original header below + + +From 43342ab90704f5f850733544288485048160003d Mon Sep 17 00:00:00 2001 +From: Stefan Behnel +Date: Thu, 11 Sep 2014 19:35:52 +0200 +Subject: [PATCH] provide "Cython.Compiler.Main.Version" to keep supporting old + PyTables versions that import it from there + +--HG-- +extra : transplant_source : %B1%BC%5C%CD%A6%EEmr4B%0F%AF%1C%E0yq9%EA%ADX +--- + Cython/Compiler/Main.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py +index 21b7fe1..37662d6 100644 +--- a/Cython/Compiler/Main.py ++++ b/Cython/Compiler/Main.py +@@ -22,10 +22,12 @@ + from .Scanning import PyrexScanner, FileSourceDescriptor + from .Errors import PyrexError, CompileError, error, warning + from .Symtab import ModuleScope +-from .. import __version__ as version + from .. import Utils + from . import Options + ++from . import Version # legacy import needed by old PyTables versions ++version = Version.version # legacy attribute - use "Cython.__version__" instead ++ + module_name_pattern = re.compile(r"[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$") + + verbose = 0 diff --git a/python-Cython.changes b/python-Cython.changes index cf73d53..12e9bce 100644 --- a/python-Cython.changes +++ b/python-Cython.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Sep 12 10:52:18 UTC 2014 - toddrme2178@gmail.com + +- Add Cython-fix-version-detection.patch + This is a patch from upstream that restores version information + whose removal is preventing several packages from correctly + detecting Cython's presence. It is already merged upstream and + so should be in the next release. + Note that despite what upstream says, + python-tables/python3-tables is NOT the only package affected by + this, which is why the patch is going here instead of + python-tables/python3-tables. + python-bcolz/python3-bcolz is an example of another package + affected. + ------------------------------------------------------------------- Thu Sep 11 09:30:20 UTC 2014 - toddrme2178@gmail.com diff --git a/python-Cython.spec b/python-Cython.spec index a97ce6f..1d8d86c 100644 --- a/python-Cython.spec +++ b/python-Cython.spec @@ -25,6 +25,8 @@ License: Apache-2.0 Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/C/Cython/Cython-%{version}.tar.gz Source1: python-Cython-rpmlintrc +#PATCH-FIX-UPSTREAM Cython-fix-version-detection.patch https://github.com/cython/cython/commit/43342ab90704f5f850733544288485048160003d +Patch0: Cython-fix-version-detection.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes BuildRequires: python-devel @@ -55,6 +57,7 @@ code. %prep %setup -q -n Cython-%{version} +%patch0 -p1 sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py # Fix non-executable scripts sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h} Demos/embed/Makefile.{unix,msc.static} Doc/primes.c # Fix EOL encoding mv bin/cython bin/cython-%{py_ver}