From 1c4cb116cec60cb88d60c15015693bd2c2df1cf42686a18283f45cf955829512 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Thu, 18 Dec 2014 11:10:45 +0000
Subject: [PATCH 1/3] Accepting request 265716 from
home:posophe:branches:devel:languages:python
Fix update alternatives
OBS-URL: https://build.opensuse.org/request/show/265716
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=51
---
Cython-0.21.1.tar.gz | 3 ++
Cython-0.21.tar.gz | 3 --
Cython-fix-version-detection.patch | 44 ------------------------------
python-Cython.changes | 36 ++++++++++++++++++++++++
python-Cython.spec | 25 ++++++++---------
5 files changed, 51 insertions(+), 60 deletions(-)
create mode 100644 Cython-0.21.1.tar.gz
delete mode 100644 Cython-0.21.tar.gz
delete mode 100644 Cython-fix-version-detection.patch
diff --git a/Cython-0.21.1.tar.gz b/Cython-0.21.1.tar.gz
new file mode 100644
index 0000000..74094f9
--- /dev/null
+++ b/Cython-0.21.1.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:43f64d225186ec7601249ebd1e8f8a7c33767974b493de6783c5b3dd0415bf35
+size 2743480
diff --git a/Cython-0.21.tar.gz b/Cython-0.21.tar.gz
deleted file mode 100644
index 3343e24..0000000
--- a/Cython-0.21.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-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
deleted file mode 100644
index 444498a..0000000
--- a/Cython-fix-version-detection.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-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 f9ad4e5..6b03e75 100644
--- a/python-Cython.changes
+++ b/python-Cython.changes
@@ -1,3 +1,39 @@
+-------------------------------------------------------------------
+Thu Dec 18 10:48:28 UTC 2014 - p.drouand@gmail.com
+
+- Improve update-alternatives.
+- Remove Cython-fix-version-detection.patch
+ (got fixed upstream)
+- update to version 0.21.1:
+ * Features added
+ - New cythonize option -a to generate the annotated HTML source view.
+ - Missing C-API declarations in cpython.unicode were added.
+ - Passing language='c++' into cythonize() globally enables C++ mode
+ for all modules that were not passed as Extension objects
+ (i.e. only source files and file patterns).
+ - Py_hash_t is a known type (used in CPython for hash values).
+ - PySlice_*() C-API functions are available from the cpython.slice module.
+ - Allow arrays of C++ classes.
+ * Bugs fixed
+ - Reference leak for non-simple Python expressions in boolean and/or expressions.
+ - To fix a name collision and to reflect availability on host
+ platforms, standard C declarations [ clock(), time(), struct tm
+ and tm* functions ] were moved from posix/time.pxd to a new
+ libc/time.pxd. Patch by Charles Blake.
+ - Rerunning unmodified modules in IPython's cython support
+ failed. Patch by Matthias Bussonier.
+ - Casting C++ std::string to Python byte strings failed when
+ auto-decoding was enabled.
+ - Fatal exceptions in global module init code could lead to
+ crashes if the already created module was used later on
+ (e.g. through a stale reference in sys.modules or elsewhere).
+ - cythonize.py script was not installed on MS-Windows.
+ * Other changes
+ - Compilation no longer fails hard when unknown compilation
+ options are passed. Instead, it raises a warning and ignores
+ them (as it did silently before 0.21). This will be changed back
+ to an error in a future release.
+
-------------------------------------------------------------------
Sun Nov 09 22:57:00 UTC 2014 - Led
diff --git a/python-Cython.spec b/python-Cython.spec
index f6fcf12..bd5de05 100644
--- a/python-Cython.spec
+++ b/python-Cython.spec
@@ -17,7 +17,7 @@
Name: python-Cython
-Version: 0.21
+Version: 0.21.1
Release: 0
Url: http://www.cython.org
Summary: The Cython compiler for writing C extensions for the Python language
@@ -25,8 +25,6 @@ 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
@@ -57,7 +55,6 @@ 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}
@@ -76,13 +73,12 @@ 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}
+rm -rf %{buildroot}%{python_sitearch}/__pycache__/
+# avoid conflicts with python 2 version
-%pre
-# 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:
-[ -h %{_bindir}/cygdb ] || rm -f %{_bindir}/cygdb
-[ -h %{_bindir}/cythonize ] || rm -f %{_bindir}/cythonize
-[ -h %{_bindir}/cython ] || rm -f %{_bindir}/cython
+# Disabled testsuite as it takes a long time:
+#%%check
+#python runtests.py
%post
update-alternatives \
@@ -102,12 +98,15 @@ fi
%files
%defattr(-,root,root,-)
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
-%ghost %{_bindir}/cygdb
+%{_bindir}/cygdb
+%{_bindir}/cython
+%{_bindir}/cythonize
%{_bindir}/cygdb-%{py_ver}
-%ghost %{_bindir}/cython
%{_bindir}/cython-%{py_ver}
-%ghost %{_bindir}/cythonize
%{_bindir}/cythonize-%{py_ver}
+%ghost %{_sysconfdir}/alternatives/cygdb
+%ghost %{_sysconfdir}/alternatives/cython
+%ghost %{_sysconfdir}/alternatives/cythonize
%{python_sitearch}/Cython/
%{python_sitearch}/Cython-%{version}-py%{py_ver}.egg-info
%{python_sitearch}/cython.py*
From 679551f9dfbc0f9f49a3305bed7d09230318bf7adb5045444ede1672f8b7d80d Mon Sep 17 00:00:00 2001
From: Alberto Planas Dominguez
Date: Thu, 8 Jan 2015 13:41:57 +0000
Subject: [PATCH 2/3] Accepting request 280306 from home:dimstar:Cython
- Fox usage of update-alternatives.
OBS-URL: https://build.opensuse.org/request/show/280306
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=52
---
python-Cython.changes | 5 +++++
python-Cython.spec | 11 +++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/python-Cython.changes b/python-Cython.changes
index 6b03e75..0f5b800 100644
--- a/python-Cython.changes
+++ b/python-Cython.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Jan 8 12:22:10 UTC 2015 - dimstar@opensuse.org
+
+- Fox usage of update-alternatives.
+
-------------------------------------------------------------------
Thu Dec 18 10:48:28 UTC 2014 - p.drouand@gmail.com
diff --git a/python-Cython.spec b/python-Cython.spec
index bd5de05..9b30d7e 100644
--- a/python-Cython.spec
+++ b/python-Cython.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-Cython
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -69,9 +69,12 @@ 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
+# Prepare for update-alternatives usage
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+ln -s -f %{_sysconfdir}/alternatives/cython %{buildroot}%{_bindir}/cython
+ln -s -f %{_sysconfdir}/alternatives/cythonize %{buildroot}%{_bindir}/cythonize
+ln -s -f %{_sysconfdir}/alternatives/cygdb %{buildroot}%{_bindir}/cygdb
+
%fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir}
rm -rf %{buildroot}%{python_sitearch}/__pycache__/
# avoid conflicts with python 2 version
From 25ef40c3e4fb7b46e9bd395710ae86e57a4946dd18b422d0f222a728dfa20ad5 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Fri, 9 Jan 2015 23:05:34 +0000
Subject: [PATCH 3/3] Accepting request 280613 from home:dimstar:Factory
- Re-enable test-suite.
- Add gcc-c++ BuildRequires: needed for the test-suite to be able
to pass.
- Fix usage of update-alternatives.
OBS-URL: https://build.opensuse.org/request/show/280613
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=53
---
python-Cython.changes | 9 ++++++++-
python-Cython.spec | 6 +++---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/python-Cython.changes b/python-Cython.changes
index 0f5b800..a79f23f 100644
--- a/python-Cython.changes
+++ b/python-Cython.changes
@@ -1,7 +1,14 @@
+-------------------------------------------------------------------
+Fri Jan 9 15:20:31 UTC 2015 - dimstar@opensuse.org
+
+- Re-enable test-suite.
+- Add gcc-c++ BuildRequires: needed for the test-suite to be able
+ to pass.
+
-------------------------------------------------------------------
Thu Jan 8 12:22:10 UTC 2015 - dimstar@opensuse.org
-- Fox usage of update-alternatives.
+- Fix usage of update-alternatives.
-------------------------------------------------------------------
Thu Dec 18 10:48:28 UTC 2014 - p.drouand@gmail.com
diff --git a/python-Cython.spec b/python-Cython.spec
index 9b30d7e..75406f3 100644
--- a/python-Cython.spec
+++ b/python-Cython.spec
@@ -27,6 +27,7 @@ Source: http://pypi.python.org/packages/source/C/Cython/Cython-%{version
Source1: python-Cython-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: fdupes
+BuildRequires: gcc-c++
BuildRequires: python-devel
BuildRequires: python-xml
Provides: python-cython = %{version}
@@ -79,9 +80,8 @@ ln -s -f %{_sysconfdir}/alternatives/cygdb %{buildroot}%{_bindir}/cygdb
rm -rf %{buildroot}%{python_sitearch}/__pycache__/
# avoid conflicts with python 2 version
-# Disabled testsuite as it takes a long time:
-#%%check
-#python runtests.py
+%check
+python runtests.py
%post
update-alternatives \