diff --git a/Cython-0.20.2.tar.gz b/Cython-0.20.2.tar.gz deleted file mode 100644 index a35fbb5..0000000 --- a/Cython-0.20.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed13b606a2aeb5bd6c235f8ed6c9988c99d01a033d0d21d56137c13d5c7be63f -size 1432614 diff --git a/Cython-0.21.tar.gz b/Cython-0.21.tar.gz new file mode 100644 index 0000000..3343e24 --- /dev/null +++ b/Cython-0.21.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cd5787fb3f1eaf8326b21bdfcb90aabd3eca7c214c5b7b503fbb82da97bbaa0 +size 1490358 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 3575e0c..12e9bce 100644 --- a/python-Cython.changes +++ b/python-Cython.changes @@ -1,3 +1,117 @@ +------------------------------------------------------------------- +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 + +- Update to 0.21 (2014-09-10) + * Features added + * C (cdef) functions allow inner Python functions. + * Enums can now be declared as cpdef to export their values to + the module's Python namespace. Cpdef enums in pxd files export + their values to their own module, iff it exists. + * Allow @staticmethod decorator to declare static cdef methods. + This is especially useful for declaring "constructors" for + cdef classes that can take non-Python arguments. + * Taking a ``char*`` from a temporary Python string object is safer + in more cases and can be done inside of non-trivial expressions, + including arguments of a function call. A compile time error + is raised only when such a pointer is assigned to a variable and + would thus exceed the lifetime of the string itself. + * Generators have new properties ``__name__`` and ``__qualname__`` + that provide the plain/qualified name of the generator function + (following CPython 3.5). See http://bugs.python.org/issue21205 + * The ``inline`` function modifier is available as a decorator + ``@cython.inline`` in pure mode. + * When cygdb is run in a virtualenv, it enables the same virtualenv + inside of the debugger. Patch by Marc Abramowitz. + * PEP 465: dedicated infix operator for matrix multiplication (A @ B). + * HTML output of annotated code uses Pygments for code highlighting + and generally received a major overhaul by Matthias Bussonier. + * IPython magic support is now available directly from Cython with + the command "%load_ext cython". Cython code can directly be + executed in a cell when marked with "%%cython". Code analysis + is available with "%%cython -a". Patch by Martín Gaitán. + * Simple support for declaring Python object types in Python signature + annotations. Currently requires setting the compiler directive + ``annotation_typing=True``. + * New directive ``use_switch`` (defaults to True) to optionally disable + the optimization of chained if statement to C switch statements. + * Defines dynamic_cast et al. in ``libcpp.cast`` and C++ heap data + structure operations in ``libcpp.algorithm``. + * Shipped header declarations in ``posix.*`` were extended to cover + more of the POSIX API. Patches by Lars Buitinck and Mark Peek. + * Optimizations + * Simple calls to C implemented Python functions/methods are faster. + This also speeds up many operations on builtins that Cython cannot + otherwise optimise. + * The "and"/"or" operators try to avoid unnecessary coercions of their + arguments. They now evaluate the truth value of each argument + independently and only coerce the final result of the whole expression + to the target type (e.g. the type on the left side of an assignment). + This also avoids reference counting overhead for Python values during + evaluation and generally improves the code flow in the generated C code. + * The Python expression "2 ** N" is optimised into bit shifting. + See http://bugs.python.org/issue21420 + * Cascaded assignments (a = b = ...) try to minimise the number of + type coercions. + * Calls to ``slice()`` are translated to a straight C-API call. + * Bugs fixed + * Crash when assigning memory views from ternary conditional expressions. + * Nested C++ templates could lead to unseparated ">>" characters being + generated into the C++ declarations, which older C++ compilers could + not parse. + * Sending SIGINT (Ctrl-C) during parallel cythonize() builds could + hang the child processes. + * No longer ignore local setup.cfg files for distutils in pyximport. + Patch by Martin Teichmann. + * Taking a ``char*`` from an indexed Python string generated unsafe + reference counting code. + * Set literals now create all of their items before trying to add them + to the set, following the behaviour in CPython. This makes a + difference in the rare case that the item creation has side effects + and some items are not hashable (or if hashing them has side effects, + too). + * Cython no longer generates the cross product of C functions for code + that uses memory views of fused types in function signatures (e.g. + ``cdef func(floating[:] a, floating[:] b)``). This is considered the + expected behaviour by most users and was previously inconsistent with + other structured types like C arrays. Code that really wants all type + combinations can create the same fused memoryview type under different + names and use those in the signature to make it clear which types are + independent. + * Names that were unknown at compile time were looked up as builtins at + runtime but not as global module names. Trying both lookups helps with + globals() manipulation. + * Fixed stl container conversion for typedef element types. + * ``obj.pop(x)`` truncated large C integer values of x to ``Py_ssize_t``. + * ``__init__.pyc`` is recognised as marking a package directory + (in addition to .py, .pyx and .pxd). + * Syntax highlighting in ``cython-mode.el`` for Emacs no longer + incorrectly highlights keywords found as part of longer names. + * Correctly handle ``from cython.submodule cimport name``. + * Fix infinite recursion when using super with cpdef methods. + * No-args ``dir()`` was not guaranteed to return a sorted list. + * Other changes + * The header line in the generated C files no longer contains the + timestamp but only the Cython version that wrote it. This was + changed to make builds more reproducible. + * Removed support for CPython 2.4, 2.5 and 3.1. + * The licensing implications on the generated code were clarified + to avoid legal constraints for users. + ------------------------------------------------------------------- Thu Jul 31 16:26:07 UTC 2014 - dimstar@opensuse.org diff --git a/python-Cython.spec b/python-Cython.spec index 2088f16..1d8d86c 100644 --- a/python-Cython.spec +++ b/python-Cython.spec @@ -17,7 +17,7 @@ Name: python-Cython -Version: 0.20.2 +Version: 0.21 Release: 0 Url: http://www.cython.org Summary: The Cython compiler for writing C extensions for the Python language @@ -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,11 +57,14 @@ 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} +mv bin/cythonize bin/cythonize-%{py_ver} mv bin/cygdb bin/cygdb-%{py_ver} sed -i "s|bin/cython|bin/cython-%{py_ver}|" setup.py +sed -i "s|bin/cythonize|bin/cythonize-%{py_ver}|" setup.py sed -i "s|bin/cygdb|bin/cygdb-%{py_ver}|" setup.py %build @@ -68,6 +73,7 @@ CFLAGS="%{optflags}" python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} ln -s %{_bindir}/cython-%{py_ver} %{buildroot}%{_bindir}/cython +ln -s %{_bindir}/cythonize-%{py_ver} %{buildroot}%{_bindir}/cythonize ln -s %{_bindir}/cygdb-%{py_ver} %{buildroot}%{_bindir}/cygdb %fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir} @@ -75,12 +81,14 @@ ln -s %{_bindir}/cygdb-%{py_ver} %{buildroot}%{_bindir}/cygdb # Since /usr/bin/cython and /usr/bin/cygdb became ghosted to be used with update-alternatives, we have to get rid # of the old binary resulting from the non-update-alternativies-ified package: [[ ! -L %{_bindir}/cygdb ]] && rm -f %{_bindir}/cygdb +[[ ! -L %{_bindir}/cythonize ]] && rm -f %{_bindir}/cythonize [[ ! -L %{_bindir}/cython ]] && rm -f %{_bindir}/cython exit 0 %post update-alternatives \ --install %{_bindir}/cython cython %{_bindir}/cython-%{py_ver} 30 \ + --slave %{_bindir}/cythonize cythonize %{_bindir}/cythonize-%{py_ver} \ --slave %{_bindir}/cygdb cygdb %{_bindir}/cygdb-%{py_ver} %preun @@ -99,6 +107,8 @@ fi %{_bindir}/cygdb-%{py_ver} %ghost %{_bindir}/cython %{_bindir}/cython-%{py_ver} +%ghost %{_bindir}/cythonize +%{_bindir}/cythonize-%{py_ver} %{python_sitearch}/Cython/ %{python_sitearch}/Cython-%{version}-py%{py_ver}.egg-info %{python_sitearch}/cython.py*