Import rpm: 8c789216e7ce6b5e929c5046a27d5d890423c750

This commit is contained in:
James Antill 2022-08-08 14:03:43 -04:00
commit 26a97db143
7 changed files with 610 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/Cython-0.29.21.tar.gz

476
Cython.spec Normal file
View File

@ -0,0 +1,476 @@
%global srcname Cython
%global upname cython
# RHEL8: Tests disabled during build due to missing dependencies
%bcond_with tests
Name: Cython
Version: 0.29.21
%global upver %{version}
Release: 5%{?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
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
# 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 python%{python3_pkgversion}-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-rpm-macros
BuildRequires: python%{python3_pkgversion}-setuptools
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-numpy
BuildRequires: python%{python3_pkgversion}-jedi
%endif
Requires: python%{python3_pkgversion}-setuptools
# 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(python%{python3_version}dist(tempita))
%description -n python%{python3_pkgversion}-%{srcname} %{_description}
Python 3 version.
%prep
%autosetup -n %{upname}-%{upver} -p1
%build
%py3_build
%install
%py3_install
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
# Rename unversioned binaries
mv %{buildroot}%{_bindir}/cython{,-%{python3_version}}
mv %{buildroot}%{_bindir}/cygdb{,-%{python3_version}}
mv %{buildroot}%{_bindir}/cythonize{,-%{python3_version}}
%if %{with tests}
%check
%{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \
%ifarch %{ix86}
--exclude run.parallel # https://github.com/cython/cython/issues/2807
%endif
%endif
%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE.txt
%doc *.txt Demos Doc Tools
%{_bindir}/cython-%{python3_version}
%{_bindir}/cygdb-%{python3_version}
%{_bindir}/cythonize-%{python3_version}
%{python3_sitearch}/%{srcname}-*.egg-info/
%{python3_sitearch}/%{srcname}/
%{python3_sitearch}/pyximport/
%{python3_sitearch}/%{upname}.py
%{python3_sitearch}/__pycache__/%{upname}.*
%changelog
* Wed Jan 13 2021 Tomas Orsava <torsava@redhat.com> - 0.29.21-5
- Convert from Fedora to the python39 module in RHEL8
- Resolves: rhbz#1877430
* Fri Nov 13 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.21-4
- Drop build dependency on coverage
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.21-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.29.21-2
- Re-enable tests.
* Wed Jul 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.29.21-1
- 0.29.21
* Wed May 27 2020 sguelton@redhat.com - 0.29.19-1
- Update to 0.29.19
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.17-4
- Rebuilt for Python 3.9
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.17-3
- Bootstrap for Python 3.9
* Wed May 13 2020 Petr Viktorin <pviktori@redhat.com> - 0.29.17-2
- Backport classmethod fixes
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1788506
* Tue Apr 28 2020 Marcel Plch <mplch@redhat.com> - 0.29.17-1
- Update to 0.29.17
* Wed Mar 25 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.16-1
- Update to 0.29.16 (#1816785)
* Sat Feb 08 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.15-1
- Update to 0.29.15 (#1800158)
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Nov 04 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.14-1
- Update to 0.29.14 (#1768034)
- Python 2 subpackage has been removed
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.13-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.13-4
- Rebuilt for Python 3.8
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.13-3
- Bootstrap for Python 3.8
* Thu Aug 01 2019 Gwyn Ciesla <gwync@protonmail.com> 0.29.13-2
- Rebuild with new numpy.
* Sat Jul 27 11:58:51 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29.13-1
- Update to 0.29.13
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 22 2019 Petr Viktorin <pviktori@redhat.com> - 0.29.12-2
- Remove non-essential Python 2 test dependencies
* Thu Jul 11 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.12-1
- Update to 0.29.12 (#1727580)
* Mon Jul 01 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.11-1
- Update to 0.29.11 (#1725361)
* Sun Jun 02 2019 Charalampos Stratakis <cstratak@redhat.com> - 0.29.10-1
- Update to 0.29.10 (#1716146)
* Thu May 30 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.9-1
- Update to 0.29.9 (#1714365)
* Mon May 13 07:10:35 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29.7-1
- Update to 0.29.7
* Wed Feb 27 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.6-1
- Update to 0.29.6 (#1683661)
* Fri Feb 08 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.5-1
- Update to 0.29.5 (#1667643)
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jan 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.3-1
- Update to 0.29.3 (#1667643)
* Tue Jan 08 2019 Alex Cobb <alex.cobb@smart.mit.edu> - 0.29.1-2
- Added emacs-cython-mode subpackage
* Mon Dec 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29.1-1
- Update to 0.29.1
* Mon Dec 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29-1
- Update to 0.29
* Wed Oct 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29~rc2-1
- Update to 0.29~rc2
* Sat Aug 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.5-1
- Update to 0.28.5
* Sun Aug 05 2018 Miro Hrončok <mhroncok@redhat.com> - 0.28.4-3
- Only have one /usr/bin/cython
* Sun Jul 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.4-1
- Update to 0.28.4
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.28.1-2
- Rebuilt for Python 3.7
* Mon Mar 19 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.1-1
- Update to 0.28.1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Nov 06 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.27.3-1
- Update to 0.27.3
* Mon Oct 02 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.27.1-1
- Update to 0.27.1
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed May 03 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.25.2-5
- Fix license
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Dec 22 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.25.2-3
- Backport couple of patches
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.25.2-2
- Rebuild for Python 3.6
* Sat Dec 10 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.25.2-1
- Update to 0.25.2
* Sat Aug 27 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.24.1-8
- Fix provides (RHBZ #1370879)
* Thu Aug 25 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.24.1-7
- Run test suite
* Thu Aug 25 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.24.1-6
- Provide old names
* Thu Aug 25 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.24.1-5
- Use %%python_provide
* Tue Aug 23 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.24.1-4
- Update to 0.24.1
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.23.4-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jan 13 2016 Orion Poplawski <orion@cora.nwra.com> - 0.23.4-1
- Update to 0.23.4
- Ship cythonize3
- Modernize and cleanup spec
- Run tests, one python3 test fails with 3.5
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 0.23-2
- Rebuilt for Python3.5 rebuild
* Wed Aug 12 2015 Neal Becker <ndbecker2@gmail.com> - 0.23-2
- Update to 0.23
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Feb 13 2015 nbecker <ndbecker2@gmail.com> - 0.22-1
- oops, that should be 0.22 not 0.22.1
* Fri Feb 13 2015 nbecker <ndbecker2@gmail.com> - 0.22.1-1
- Update to 0.22
* Sat Nov 22 2014 nbecker <ndbecker2@gmail.com> - 0.21.1-1
- Update to 0.21.1 (br #1164297)
* Mon Sep 15 2014 nbecker <ndbecker2@gmail.com> - 0.21-5
- Add /bin/cythonize
* Mon Sep 15 2014 nbecker <ndbecker2@gmail.com> - 0.21-1
- Update to 0.21
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 28 2014 Thomas Spura <tomspur@fedoraproject.org> - 0.20.1-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 0.20.1-2
- Rebuild for Python 3.4
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 0.20.1-1
- Update to 0.20.1
* Mon Jan 20 2014 nbecker <ndbecker2@gmail.com> - 0.20-1
- Update to 0.20
* Thu Oct 17 2013 nbecker <ndbecker2@gmail.com> - 0.19.2-2
- Fix BR 1019498
* Sun Oct 13 2013 nbecker <ndbecker2@gmail.com> - 0.19-2
- Update to 0.19.2
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Apr 19 2013 nbecker <ndbecker2@gmail.com> - 0.19-1
- Update to 0.19
* Tue Jan 29 2013 Neal Becker <ndbecker2@gmail.com> - 0.18-1
- update to 0.18
* Sat Dec 15 2012 Neal Becker <ndbecker2@gmail.com> - 0.17.3-1
- Update to 0.17.3
* Wed Nov 21 2012 Neal Becker <ndbecker2@gmail.com> - 0.17.2-1
- update to 0.17.2
* Wed Sep 26 2012 Neal Becker <ndbecker2@gmail.com> - 0.17.1-1
- Update to 0.17.1
* Mon Sep 3 2012 Neal Becker <ndbecker2@gmail.com> - 0.17-1
- Update to 0.17
* Tue Aug 28 2012 Neal Becker <ndbecker2@gmail.com> - 0.17-3.b3
- Turn on check (temporarily)
- Add br numpy from check
* Tue Aug 28 2012 Neal Becker <ndbecker2@gmail.com> - 0.17-1.b3
- Test 0.17b3
* Fri Aug 24 2012 David Malcolm <dmalcolm@redhat.com> - 0.16-3
- generalize egg-info logic to support RHEL (rhbz#851528)
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Apr 27 2012 Neal Becker <ndbecker2@gmail.com> - 0.16-1
- Update to 0.16
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Sep 20 2011 Neal Becker <ndbecker2@gmail.com> - 0.15.1-1
- Update to 0.15.1
* Sat Aug 6 2011 Neal Becker <ndbecker2@gmail.com> - 0.15-1
- Update to 0.15
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Feb 5 2011 Neal Becker <ndbecker2@gmail.com> - 0.14.1-1
- Update to 0.14.1
* Wed Dec 15 2010 Neal Becker <ndbecker2@gmail.com> - 0.14-2
- Add cygdb
* Wed Dec 15 2010 Neal Becker <ndbecker2@gmail.com> - 0.14-1
- Update to 0.14
* Wed Aug 25 2010 Neal Becker <ndbecker2@gmail.com> - 0.13-1
- Update to 0.13
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.12.1-5
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Fri Feb 5 2010 Neal Becker <ndbecker2@gmail.com> - 0.12.1-4
- Disable check for now as it fails on PPC
* Tue Feb 2 2010 Neal Becker <ndbecker2@gmail.com> - 0.12.1-2
- typo
- stupid rpm comments
* Mon Nov 23 2009 Neal Becker <ndbecker2@gmail.com> - 0.12-1.rc1
- Make that 0.12
* Mon Nov 23 2009 Neal Becker <ndbecker2@gmail.com> - 0.12.1-1.rc1
- Update to 0.12.1
* Sun Sep 27 2009 Neal Becker <ndbecker2@gmail.com> - 0.11.3-1.rc1
- Update to 0.11.3rc1
- Update to 0.11.3
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed May 20 2009 Neal Becker <ndbecker2@gmail.com> - 0.11.2-1
- Update to 0.11.2
* Thu Apr 16 2009 Neal Becker <ndbecker2@gmail.com> - 0.11.1-1
- Update to 0.11.1
* Sat Mar 14 2009 Neal Becker <ndbecker2@gmail.com> - 0.11-2
- Missed cython.py*
* Sat Mar 14 2009 Neal Becker <ndbecker2@gmail.com> - 0.11-1
- Update to 0.11
- Exclude numpy from tests so we don't have to BR it
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Dec 17 2008 Neal Becker <ndbecker2@gmail.com> - 0.10.3-1
- Update to 0.10.3
* Thu Dec 04 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.2-2
- Rebuild for Python 2.6
* Mon Dec 1 2008 Neal Becker <ndbecker2@gmail.com> - 0.10.2-1
- Update to 0.10.2
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.1-2
- Rebuild for Python 2.6
* Wed Nov 19 2008 Neal Becker <ndbecker2@gmail.com> - 0.10.1-1
- Update to 0.10.1
* Sun Nov 9 2008 Neal Becker <ndbecker2@gmail.com> - 0.10-3
- Fix typo
* Sun Nov 9 2008 Neal Becker <ndbecker2@gmail.com> - 0.10-1
- Update to 0.10
* Fri Jun 13 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.8-2
- Install into python_sitearch
- Add %%check
* Fri Jun 13 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.8-1
- Update to 0.9.8
* Mon Apr 14 2008 José Matos <jamatos[AT]fc.up.pt> - 0.9.6.13.1-3
- Remove remaining --record.
- Add more documentation (Doc and Tools).
- Add correct entry for egg-info (F9+).
* Mon Apr 14 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.13.1-2
- Change License to Python
- Install About.html
- Fix mixed spaces/tabs
- Don't use --record
* Tue Apr 8 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.13.1-1
- Update to 0.9.6.13.1
* Mon Apr 7 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.13-1
- Update to 0.9.6.13
- Add docs
* Tue Feb 26 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.12-1
- Initial version

View File

@ -0,0 +1,114 @@
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)

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

11
plans.fmf Normal file
View File

@ -0,0 +1,11 @@
discover:
- name: Smoke-tests
how: shell
tests:
- name: python-import-test
test: python3 -c 'import Cython'
require:
- python3-Cython
duration: 1m
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA1 (Cython-0.29.21.tar.gz) = 718dcfee83132421e2df4eb6fa0ef7f3917bf7b9