Compare commits
22 Commits
master
...
f37-riscv6
Author | SHA1 | Date | |
---|---|---|---|
|
5ee8e4c98c | ||
|
7f37560dbd | ||
|
7b06dc068d | ||
|
2f1be2ed78 | ||
|
29491f0523 | ||
|
6dc133adcf | ||
|
b85dfd3bda | ||
|
374291e8ee | ||
|
ba54d3b2cd | ||
|
db919742fc | ||
|
6678a84899 | ||
|
f52c2ecc11 | ||
|
d5f7a019c7 | ||
|
1ee3b1a90c | ||
|
d42d4b95f6 | ||
|
5f403f6493 | ||
|
f2f31bc0ff | ||
|
d66d4fa971 | ||
|
abebf576dc | ||
|
705633024a | ||
|
e54e595a42 | ||
|
9a9bbcd568 |
7
.gitignore
vendored
7
.gitignore
vendored
@ -45,3 +45,10 @@ Cython-0.12.1.tar.gz
|
||||
/Cython-0.29.17.tar.gz
|
||||
/Cython-0.29.19.tar.gz
|
||||
/Cython-0.29.21.tar.gz
|
||||
/Cython-0.29.22.tar.gz
|
||||
/Cython-0.29.24.tar.gz
|
||||
/Cython-0.29.26.tar.gz
|
||||
/Cython-0.29.28.tar.gz
|
||||
/Cython-0.29.29.tar.gz
|
||||
/Cython-0.29.30.tar.gz
|
||||
/Cython-0.29.32.tar.gz
|
||||
|
176
Cython.spec
176
Cython.spec
@ -1,93 +1,79 @@
|
||||
%global srcname Cython
|
||||
%global upname cython
|
||||
%bcond_with tests
|
||||
|
||||
%bcond_without tests
|
||||
# This bcond allows to ship a non-compiled version
|
||||
# Slower, but sometimes necessary with alpha Python versions
|
||||
%bcond_without cython_compile
|
||||
|
||||
Name: Cython
|
||||
Version: 0.29.21
|
||||
%global upver %{version_no_tilde %{nil}}
|
||||
Release: 4%{?dist}
|
||||
Version: 0.29.32
|
||||
Release: 1.0.riscv64%{?dist}
|
||||
Summary: Language for writing Python extension modules
|
||||
|
||||
License: ASL 2.0
|
||||
URL: http://www.cython.org
|
||||
Source: https://github.com/cython/cython/archive/%{upver}/%{srcname}-%{version}.tar.gz
|
||||
Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
|
||||
|
||||
# Partially work around issues with class and static methods
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1788506
|
||||
# Mostly backported from upstream: https://github.com/cython/cython/pull/3106
|
||||
# This also:
|
||||
# - Removes staticmethod optimizations for normal functions
|
||||
# - Removes failing test for staticmethod fused functions, which still fail
|
||||
# See also: https://github.com/cython/cython/issues/3614
|
||||
Patch3106: class-static-method-workaround.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
%if %{with tests}
|
||||
BuildRequires: gcc-c++
|
||||
%endif
|
||||
|
||||
%global _description \
|
||||
This is a development version of Pyrex, a language\
|
||||
for writing Python extension modules.
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
Conflicts: python2-%{srcname} < 0.28.4-2
|
||||
Provides: Cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Provides: Cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Obsoletes: Cython < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
%if %{with tests}
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python3-numpy
|
||||
BuildRequires: python3-jedi
|
||||
%endif
|
||||
|
||||
%if %{with cython_compile}
|
||||
BuildRequires: gcc
|
||||
%global python3_site %{python3_sitearch}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%global python3_site %{python3_sitelib}
|
||||
%endif
|
||||
|
||||
%global _description %{expand:
|
||||
The Cython language makes writing C extensions for the Python language as easy
|
||||
as Python itself. Cython is a source code translator based on Pyrex,
|
||||
but supports more cutting edge functionality and optimizations.
|
||||
|
||||
The Cython language is a superset of the Python language (almost all Python
|
||||
code is also valid Cython code), but Cython additionally supports optional
|
||||
static typing to natively call C functions, operate with C++ classes and
|
||||
declare fast C types on variables and class attributes.
|
||||
This allows the compiler to generate very efficient C code from Cython code.
|
||||
|
||||
This makes Cython the ideal language for writing glue code for external C/C++
|
||||
libraries, and for fast C modules that speed up the execution of Python code.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
|
||||
%package -n python3-Cython
|
||||
Summary: %{summary}
|
||||
Provides: Cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Provides: Cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Provides: cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Provides: cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
%py_provides python3-cython
|
||||
|
||||
# A small templating library is bundled in Cython/Tempita
|
||||
# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita
|
||||
# but the bundled copy is patched and reorganized.
|
||||
# Upstream homepage is inaccessible.
|
||||
Provides: bundled(python3dist(tempita))
|
||||
|
||||
%description -n python3-%{srcname} %{_description}
|
||||
%description -n python3-Cython %{_description}
|
||||
|
||||
Python 3 version.
|
||||
|
||||
%package -n emacs-cython-mode
|
||||
Summary: A major mode for editing Cython source files in Emacs
|
||||
BuildArch: noarch
|
||||
BuildRequires: emacs
|
||||
Requires: emacs(bin) >= %{_emacs_version}
|
||||
|
||||
%description -n emacs-cython-mode
|
||||
cython-mode is an Emacs major mode for editing Cython source files.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{upname}-%{upver} -p1
|
||||
%autosetup -n cython-%{version} -p1
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
# emacs-cython-mode build
|
||||
echo ";;
|
||||
(require 'cython-mode)" > cython-mode-init.el
|
||||
cp -p Tools/cython-mode.el .
|
||||
%{_emacs_bytecompile} *.el
|
||||
%py3_build -- %{!?with_cython_compile:--no-cython-compile}
|
||||
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||
|
||||
# emacs-cython-mode install
|
||||
mkdir -p %{buildroot}%{_emacs_sitelispdir}/
|
||||
cp -p cython-mode.el cython-mode.elc %{buildroot}%{_emacs_sitelispdir}/
|
||||
mkdir -p %{buildroot}%{_emacs_sitestartdir}/
|
||||
cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir}/
|
||||
%py3_install -- %{!?with_cython_compile:--no-cython-compile}
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
@ -99,24 +85,72 @@ cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir
|
||||
|
||||
%endif
|
||||
|
||||
%files -n python3-%{srcname}
|
||||
|
||||
%files -n python3-Cython
|
||||
%license LICENSE.txt
|
||||
%doc *.txt Demos Doc Tools
|
||||
%{_bindir}/cython
|
||||
%{_bindir}/cygdb
|
||||
%{_bindir}/cythonize
|
||||
%{python3_sitearch}/%{srcname}-*.egg-info/
|
||||
%{python3_sitearch}/%{srcname}/
|
||||
%{python3_sitearch}/pyximport/
|
||||
%{python3_sitearch}/%{upname}.py
|
||||
%{python3_sitearch}/__pycache__/%{upname}.*
|
||||
%{python3_site}/Cython-*.egg-info/
|
||||
%{python3_site}/Cython/
|
||||
%{python3_site}/pyximport/
|
||||
%pycached %{python3_site}/cython.py
|
||||
|
||||
%files -n emacs-cython-mode
|
||||
%license LICENSE.txt
|
||||
%{_emacs_sitelispdir}/cython*.el*
|
||||
%{_emacs_sitestartdir}/cython*.el*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 21 2022 Miro Hrončok <mhroncok@redhat.com> - 0.29.32-1.0.riscv64
|
||||
- Disable emacs-cython-mode, due to broken emacs deps on riscv64
|
||||
- Bootstrap for Python 3.11 on riscv64
|
||||
|
||||
* Mon Aug 08 2022 Miro Hrončok <mhroncok@redhat.com> - 0.29.32-1
|
||||
- Update to 0.29.32
|
||||
|
||||
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.30-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.29.30-3
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.29.30-2
|
||||
- Bootstrap for Python 3.11
|
||||
|
||||
* Mon May 30 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.29.30-1
|
||||
- Update to 0.29.30
|
||||
|
||||
* Thu Mar 31 2022 Miro Hrončok <mhroncok@redhat.com> - 0.29.28-1
|
||||
- Update to 0.29.28
|
||||
|
||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.26-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jan 07 2022 Miro Hrončok <mhroncok@redhat.com> - 0.29.26-1
|
||||
- Update to 0.29.26
|
||||
|
||||
* Wed Jul 21 2021 Scott Talbert <swt@techie.net> - 0.29.24-1
|
||||
- Update to 0.29.24 to fix FTBFS with Python 3.10
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.22-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.29.22-4
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.29.22-3
|
||||
- Bootstrap for Python 3.10
|
||||
|
||||
* Tue Mar 09 2021 Miro Hrončok <mhroncok@redhat.com> - 0.29.22-2
|
||||
- Remove an obsoleted patch
|
||||
- Remove old Obsoletes and Conflicts
|
||||
- Update description
|
||||
- Provide cython, python3-cython
|
||||
|
||||
* Thu Mar 04 2021 Miro Hrončok <mhroncok@redhat.com> - 0.29.22-1
|
||||
- Update to 0.29.22
|
||||
|
||||
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.21-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Nov 13 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.21-4
|
||||
- Drop build dependency on coverage
|
||||
|
||||
|
@ -1,114 +0,0 @@
|
||||
diff -U3 -r cython-0.29.17.orig/Cython/Compiler/ExprNodes.py cython-0.29.17/Cython/Compiler/ExprNodes.py
|
||||
--- cython-0.29.17.orig/Cython/Compiler/ExprNodes.py 2020-04-26 13:48:48.000000000 +0200
|
||||
+++ cython-0.29.17/Cython/Compiler/ExprNodes.py 2020-05-15 17:44:55.157172257 +0200
|
||||
@@ -2295,8 +2295,10 @@
|
||||
setter = 'PyDict_SetItem'
|
||||
namespace = Naming.moddict_cname
|
||||
elif entry.is_pyclass_attr:
|
||||
- code.globalstate.use_utility_code(UtilityCode.load_cached("SetNameInClass", "ObjectHandling.c"))
|
||||
- setter = '__Pyx_SetNameInClass'
|
||||
+ # Special-case setting __new__
|
||||
+ n = "SetNewInClass" if self.name == "__new__" else "SetNameInClass"
|
||||
+ code.globalstate.use_utility_code(UtilityCode.load_cached(n, "ObjectHandling.c"))
|
||||
+ setter = '__Pyx_' + n
|
||||
else:
|
||||
assert False, repr(entry)
|
||||
code.put_error_if_neg(
|
||||
diff -U3 -r cython-0.29.17.orig/Cython/Compiler/Nodes.py cython-0.29.17/Cython/Compiler/Nodes.py
|
||||
--- cython-0.29.17.orig/Cython/Compiler/Nodes.py 2020-04-26 13:48:48.000000000 +0200
|
||||
+++ cython-0.29.17/Cython/Compiler/Nodes.py 2020-05-15 17:44:55.159172253 +0200
|
||||
@@ -2872,7 +2872,6 @@
|
||||
func = decorator.decorator
|
||||
if func.is_name:
|
||||
self.is_classmethod |= func.name == 'classmethod'
|
||||
- self.is_staticmethod |= func.name == 'staticmethod'
|
||||
|
||||
if self.is_classmethod and env.lookup_here('classmethod'):
|
||||
# classmethod() was overridden - not much we can do here ...
|
||||
diff -U3 -r cython-0.29.17.orig/Cython/Utility/ObjectHandling.c cython-0.29.17/Cython/Utility/ObjectHandling.c
|
||||
--- cython-0.29.17.orig/Cython/Utility/ObjectHandling.c 2020-04-26 13:48:48.000000000 +0200
|
||||
+++ cython-0.29.17/Cython/Utility/ObjectHandling.c 2020-05-15 17:44:55.160172251 +0200
|
||||
@@ -1163,6 +1163,30 @@
|
||||
#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
|
||||
#endif
|
||||
|
||||
+/////////////// SetNewInClass.proto ///////////////
|
||||
+
|
||||
+static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value);
|
||||
+
|
||||
+/////////////// SetNewInClass ///////////////
|
||||
+//@requires: SetNameInClass
|
||||
+
|
||||
+// Special-case setting __new__: if it's a Cython function, wrap it in a
|
||||
+// staticmethod. This is similar to what Python does for a Python function
|
||||
+// called __new__.
|
||||
+static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value) {
|
||||
+#ifdef __Pyx_CyFunction_USED
|
||||
+ int ret;
|
||||
+ if (__Pyx_CyFunction_Check(value)) {
|
||||
+ PyObject *staticnew = PyStaticMethod_New(value);
|
||||
+ if (unlikely(!staticnew)) return -1;
|
||||
+ ret = __Pyx_SetNameInClass(ns, name, staticnew);
|
||||
+ Py_DECREF(staticnew);
|
||||
+ return ret;
|
||||
+ }
|
||||
+#endif
|
||||
+ return __Pyx_SetNameInClass(ns, name, value);
|
||||
+}
|
||||
+
|
||||
|
||||
/////////////// GetModuleGlobalName.proto ///////////////
|
||||
//@requires: PyDictVersioning
|
||||
Only in cython-0.29.17.orig: cython-0.29.17
|
||||
diff -U3 -r cython-0.29.17.orig/tests/run/cyfunction.pyx cython-0.29.17/tests/run/cyfunction.pyx
|
||||
--- cython-0.29.17.orig/tests/run/cyfunction.pyx 2020-04-26 13:48:48.000000000 +0200
|
||||
+++ cython-0.29.17/tests/run/cyfunction.pyx 2020-05-15 17:44:55.160172251 +0200
|
||||
@@ -376,6 +376,18 @@
|
||||
def meth(self): pass
|
||||
|
||||
|
||||
+class TestStaticmethod(object):
|
||||
+ """
|
||||
+ >>> x = TestStaticmethod()
|
||||
+ >>> x.staticmeth(42)
|
||||
+ 42
|
||||
+ >>> x.staticmeth.__get__(42)()
|
||||
+ 42
|
||||
+ """
|
||||
+ @staticmethod
|
||||
+ def staticmeth(arg): return arg
|
||||
+
|
||||
+
|
||||
cdef class TestOptimisedBuiltinMethod:
|
||||
"""
|
||||
>>> obj = TestOptimisedBuiltinMethod()
|
||||
diff -U3 -r cython-0.29.17.orig/tests/run/fused_def.pyx cython-0.29.17/tests/run/fused_def.pyx
|
||||
--- cython-0.29.17.orig/tests/run/fused_def.pyx 2020-04-26 13:48:48.000000000 +0200
|
||||
+++ cython-0.29.17/tests/run/fused_def.pyx 2020-05-15 18:03:39.436752174 +0200
|
||||
@@ -268,14 +268,6 @@
|
||||
def test_fused_def_super():
|
||||
"""
|
||||
>>> test_fused_def_super()
|
||||
- long 10
|
||||
- long 11
|
||||
- long 11
|
||||
- long 12
|
||||
- short 12
|
||||
- long 13
|
||||
- short 13
|
||||
- long 14
|
||||
<class 'fused_def.SubClass'> long 14
|
||||
<class 'fused_def.SubClass'> long 15
|
||||
<class 'fused_def.SubClass'> long 15
|
||||
@@ -296,11 +288,6 @@
|
||||
obj = SubClass()
|
||||
cls = SubClass
|
||||
|
||||
- obj.mystaticmethod(obj, 10)
|
||||
- cls.mystaticmethod(obj, 11)
|
||||
- obj.mystaticmethod[cy.short](obj, 12)
|
||||
- cls.mystaticmethod[cy.short](obj, 13)
|
||||
-
|
||||
obj.myclassmethod(14)
|
||||
cls.myclassmethod(15)
|
||||
obj.myclassmethod[cy.short](16)
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (Cython-0.29.21.tar.gz) = 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679
|
||||
SHA512 (Cython-0.29.32.tar.gz) = 55462792fa70d8edf60aa470627ab494918d7297fd7d282a7a54da76ee5a180233108404a1c8f3d79f6408f19b6e4f46b36e59fd47c38ede24f061f374437b6f
|
||||
|
Loading…
x
Reference in New Issue
Block a user