forked from pool/python-Cython
- 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
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
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
|