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
This commit is contained in:
parent
b4fe873312
commit
c6bdb0a00f
44
Cython-fix-version-detection.patch
Normal file
44
Cython-fix-version-detection.patch
Normal file
@ -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 <stefan_ml@behnel.de>
|
||||
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
|
@ -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
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user