Update to 0.4.9; Follow new RPM packaging rules; cleanups
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
c6fa048a91
commit
7fbd6db2f6
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ greenlet-0.3.1.tar.gz
|
|||||||
/greenlet-0.4.2.zip
|
/greenlet-0.4.2.zip
|
||||||
/greenlet-0.4.5.zip
|
/greenlet-0.4.5.zip
|
||||||
/greenlet-0.4.7.zip
|
/greenlet-0.4.7.zip
|
||||||
|
/greenlet-0.4.9.zip
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
From 9ad99fb5b9db916ca81bd3f5717c67e20384f7e0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ulrich Weigand <uweigand@de.ibm.com>
|
|
||||||
Date: Fri, 17 Jul 2015 14:03:17 -0500
|
|
||||||
Subject: [PATCH 1/2] Add suuport for ppc64 in LE mode running ABIv2
|
|
||||||
|
|
||||||
Signed-off-by: Ulrich Weigand <uweigand@de.ibm.com>
|
|
||||||
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
|
|
||||||
---
|
|
||||||
platform/switch_ppc64_linux.h | 22 +++++++++++++++++++---
|
|
||||||
1 file changed, 19 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/platform/switch_ppc64_linux.h b/platform/switch_ppc64_linux.h
|
|
||||||
index ee40f67..0f20756 100644
|
|
||||||
--- a/platform/switch_ppc64_linux.h
|
|
||||||
+++ b/platform/switch_ppc64_linux.h
|
|
||||||
@@ -2,6 +2,8 @@
|
|
||||||
* this is the internal transfer function.
|
|
||||||
*
|
|
||||||
* HISTORY
|
|
||||||
+ * 10-Dec-13 Ulrich Weigand <uweigand@de.ibm.com>
|
|
||||||
+ * Support ELFv2 ABI. Save float/vector registers.
|
|
||||||
* 09-Mar-12 Michael Ellerman <michael@ellerman.id.au>
|
|
||||||
* 64-bit implementation, copied from 32-bit.
|
|
||||||
* 07-Sep-05 (py-dev mailing list discussion)
|
|
||||||
@@ -40,14 +42,28 @@
|
|
||||||
|
|
||||||
#ifdef SLP_EVAL
|
|
||||||
|
|
||||||
+#if _CALL_ELF == 2
|
|
||||||
+#define STACK_MAGIC 4
|
|
||||||
+#else
|
|
||||||
#define STACK_MAGIC 6
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#if defined(__ALTIVEC__)
|
|
||||||
+#define ALTIVEC_REGS \
|
|
||||||
+ "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", \
|
|
||||||
+ "v28", "v29", "v30", "v31",
|
|
||||||
+#else
|
|
||||||
+#define ALTIVEC_REGS
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
-/* !!!!WARNING!!!! need to add "r31" in the next line if this header file
|
|
||||||
- * is meant to be compiled non-dynamically!
|
|
||||||
- */
|
|
||||||
#define REGS_TO_SAVE "r2", "r14", "r15", "r16", "r17", "r18", "r19", "r20", \
|
|
||||||
"r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r31", \
|
|
||||||
+ "fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", \
|
|
||||||
+ "fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", \
|
|
||||||
+ "fr30", "fr31", \
|
|
||||||
+ ALTIVEC_REGS \
|
|
||||||
"cr2", "cr3", "cr4"
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
slp_switch(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
From 4d0c450852a2b0cf6307cf6ca53dcdeea357cd48 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tony Breeds <tony@bakeyournoodle.com>
|
|
||||||
Date: Fri, 17 Jul 2015 14:05:04 -0500
|
|
||||||
Subject: [PATCH 2/2] Force -fno-tree-dominator-opts for ppc64 in LE mode
|
|
||||||
|
|
||||||
Disable the optimisations that are most likely to break the fragile
|
|
||||||
C/asm logic.
|
|
||||||
|
|
||||||
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
|
|
||||||
---
|
|
||||||
setup.py | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index ab02d93..acf9fec 100755
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -50,6 +50,8 @@ def _find_platform_headers():
|
|
||||||
|
|
||||||
if sys.platform == 'win32' and os.environ.get('GREENLET_STATIC_RUNTIME') in ('1', 'yes'):
|
|
||||||
extra_compile_args = ['/MT']
|
|
||||||
+ elif os.uname()[4] in ['ppc64el', 'ppc64le']:
|
|
||||||
+ extra_compile_args = ['-fno-tree-dominator-opts']
|
|
||||||
else:
|
|
||||||
extra_compile_args = []
|
|
||||||
|
|
@ -1,17 +1,15 @@
|
|||||||
|
%global modname greenlet
|
||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
|
|
||||||
Name: python-greenlet
|
Name: python-%{modname}
|
||||||
Version: 0.4.7
|
Version: 0.4.9
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Lightweight in-process concurrent programming
|
Summary: Lightweight in-process concurrent programming
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://pypi.python.org/pypi/greenlet
|
URL: http://pypi.python.org/pypi/%{modname}
|
||||||
Source0: http://pypi.python.org/packages/source/g/greenlet/greenlet-%{version}.zip
|
Source0: http://pypi.python.org/packages/source/g/%{modname}/%{modname}-%{version}.zip
|
||||||
#
|
|
||||||
# already upstreamed, should be in next release.
|
|
||||||
# https://github.com/python-greenlet/greenlet/pull/89
|
|
||||||
Patch0: python-greenlet-0.4.7-ppc64le.patch
|
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
@ -26,19 +24,35 @@ that supports micro-threads called "tasklets". Tasklets run
|
|||||||
pseudo-concurrently (typically in a single or a few OS-level threads)
|
pseudo-concurrently (typically in a single or a few OS-level threads)
|
||||||
and are synchronized with data exchanges on "channels".
|
and are synchronized with data exchanges on "channels".
|
||||||
|
|
||||||
%package devel
|
%package -n python2-%{modname}
|
||||||
Summary: C development headers for python-greenlet
|
Summary: %{summary}
|
||||||
|
%{?python_provide:%python_provide python2-%{modname}}
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
%description devel
|
%description -n python2-%{modname}
|
||||||
|
The greenlet package is a spin-off of Stackless, a version of CPython
|
||||||
|
that supports micro-threads called "tasklets". Tasklets run
|
||||||
|
pseudo-concurrently (typically in a single or a few OS-level threads)
|
||||||
|
and are synchronized with data exchanges on "channels".
|
||||||
|
|
||||||
|
This is the Python 2 version of greenlet.
|
||||||
|
|
||||||
|
%package -n python2-%{modname}-devel
|
||||||
|
Summary: C development headers for python2-greenlet
|
||||||
|
%{?python_provide:%python_provide python2-%{modname}-devel}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: python2-%{modname} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python2-%{modname}-devel
|
||||||
This package contains header files required for C modules development.
|
This package contains header files required for C modules development.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n python3-greenlet
|
%package -n python3-%{modname}
|
||||||
Summary: C development headers for python-greenlet
|
Summary: %{summary}
|
||||||
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
|
||||||
%description -n python3-greenlet
|
%description -n python3-%{modname}
|
||||||
The greenlet package is a spin-off of Stackless, a version of CPython
|
The greenlet package is a spin-off of Stackless, a version of CPython
|
||||||
that supports micro-threads called "tasklets". Tasklets run
|
that supports micro-threads called "tasklets". Tasklets run
|
||||||
pseudo-concurrently (typically in a single or a few OS-level threads)
|
pseudo-concurrently (typically in a single or a few OS-level threads)
|
||||||
@ -48,16 +62,17 @@ This is the Python 3 version of greenlet.
|
|||||||
|
|
||||||
%package -n python3-greenlet-devel
|
%package -n python3-greenlet-devel
|
||||||
Summary: C development headers for python3-greenlet
|
Summary: C development headers for python3-greenlet
|
||||||
|
%{?python_provide:%python_provide python3-%{modname}-devel}
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: python3-greenlet = %{version}-%{release}
|
Requires: python3-%{modname} = %{version}-%{release}
|
||||||
%description -n python3-greenlet-devel
|
|
||||||
|
%description -n python3-%{modname}-devel
|
||||||
This package contains header files required for C modules development.
|
This package contains header files required for C modules development.
|
||||||
|
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n greenlet-%{version}
|
%setup -q -n greenlet-%{version}
|
||||||
%patch0 -p1
|
|
||||||
chmod 644 benchmarks/*.py
|
chmod 644 benchmarks/*.py
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
@ -65,11 +80,11 @@ cp -a . %{py3dir}
|
|||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%{optflags}" %{__python2} setup.py build
|
%py2_build
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
CFLAGS="%{optflags}" %{__python3} setup.py build
|
%py3_build
|
||||||
popd
|
popd
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
@ -77,10 +92,10 @@ popd
|
|||||||
# Install python 3 first, so that python 2 gets precedence:
|
# Install python 3 first, so that python 2 gets precedence:
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
%py3_install
|
||||||
popd
|
popd
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
%py2_install
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Run the upstream test suite and benchmarking suite to further exercise the code
|
# Run the upstream test suite and benchmarking suite to further exercise the code
|
||||||
@ -94,29 +109,39 @@ pushd %{py3dir}
|
|||||||
PYTHONPATH=$(pwd) %{__python3} benchmarks/chain.py
|
PYTHONPATH=$(pwd) %{__python3} benchmarks/chain.py
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
%files
|
%files -n python2-%{modname}
|
||||||
%doc AUTHORS NEWS README.rst LICENSE LICENSE.PSF NEWS
|
%license LICENSE LICENSE.PSF
|
||||||
%doc doc/greenlet.txt README.rst benchmarks
|
%doc AUTHORS NEWS README.rst
|
||||||
|
%doc doc/greenlet.txt benchmarks
|
||||||
%{python_sitearch}/greenlet.so
|
%{python_sitearch}/greenlet.so
|
||||||
%{python_sitearch}/greenlet*.egg-info
|
%{python_sitearch}/greenlet*.egg-info
|
||||||
|
|
||||||
%files devel
|
%files -n python2-%{modname}-devel
|
||||||
%doc AUTHORS NEWS README.rst LICENSE LICENSE.PSF NEWS
|
%license LICENSE LICENSE.PSF
|
||||||
|
%doc AUTHORS NEWS README.rst
|
||||||
%{_includedir}/python2*/greenlet
|
%{_includedir}/python2*/greenlet
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-greenlet
|
%files -n python3-greenlet
|
||||||
%doc AUTHORS NEWS README.rst LICENSE LICENSE.PSF NEWS
|
%license LICENSE LICENSE.PSF
|
||||||
%doc doc/greenlet.txt README.rst benchmarks
|
%doc AUTHORS NEWS README.rst
|
||||||
|
%doc doc/greenlet.txt benchmarks
|
||||||
%{python3_sitearch}/greenlet.cpython-*.so
|
%{python3_sitearch}/greenlet.cpython-*.so
|
||||||
%{python3_sitearch}/greenlet*.egg-info
|
%{python3_sitearch}/greenlet*.egg-info
|
||||||
|
|
||||||
%files -n python3-greenlet-devel
|
%files -n python3-greenlet-devel
|
||||||
%doc AUTHORS NEWS README.rst LICENSE LICENSE.PSF NEWS
|
%license LICENSE LICENSE.PSF
|
||||||
|
%doc AUTHORS NEWS README.rst
|
||||||
%{_includedir}/python3*/greenlet
|
%{_includedir}/python3*/greenlet
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Oct 25 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.9-1
|
||||||
|
- Update to 0.4.9
|
||||||
|
- Use %license macro
|
||||||
|
- Follow new RPM Packaging guidelines
|
||||||
|
- Cleanups in spec
|
||||||
|
|
||||||
* Fri Aug 21 2015 Kevin Fenzi <kevin@scrye.com> 0.4.7-2
|
* Fri Aug 21 2015 Kevin Fenzi <kevin@scrye.com> 0.4.7-2
|
||||||
- Re-enable tests on secondary arches. Fixes #1252899
|
- Re-enable tests on secondary arches. Fixes #1252899
|
||||||
- Applied patch to build on ppc64le. Fixes #1252900
|
- Applied patch to build on ppc64le. Fixes #1252900
|
||||||
|
Loading…
Reference in New Issue
Block a user