]> git.pld-linux.org Git - packages/python-greenlet.git/blame - python-greenlet.spec
Rel 2. Blind fix seems to fix x32 tests.
[packages/python-greenlet.git] / python-greenlet.spec
CommitLineData
0efef8c8 1# TODO: Use no-tree-dominator-opts for x32 only
f818725e 2
595a528f
ER
3# Conditional build:
4%bcond_without tests # do not perform "make test"
f818725e
JK
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7%bcond_without python2_tests # CPython 2.x module tests
8
9%if %{without tests}
10%undefine with_python2_tests
11%endif
595a528f
ER
12
13%define module greenlet
14Summary: Lightweight in-process concurrent programming
15Name: python-%{module}
961cf9e4 16Version: 0.4.5
0efef8c8 17Release: 2
f818725e
JK
18License: MIT & PSF
19Group: Libraries/Python
595a528f 20URL: http://pypi.python.org/pypi/greenlet
f818725e 21Source0: http://pypi.python.org/packages/source/g/greenlet/%{module}-%{version}.zip
961cf9e4 22# Source0-md5: ce383f6475e6311cf8932ea779938703
f818725e 23%if %{with python2}
595a528f
ER
24BuildRequires: python-devel
25BuildRequires: python-setuptools
f818725e
JK
26%endif
27%if %{with python3}
28BuildRequires: python3-2to3
29BuildRequires: python3-devel
30BuildRequires: python3-distribute
31BuildRequires: python3-modules
32%endif
33BuildRequires: rpmbuild(macros) >= 1.219
595a528f
ER
34BuildRequires: rpm-pythonprov
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38The greenlet package is a spin-off of Stackless, a version of CPython
39that supports micro-threads called "tasklets". Tasklets run
40pseudo-concurrently (typically in a single or a few OS-level threads)
41and are synchronized with data exchanges on "channels".
42
43%package devel
44Summary: C development headers for python-greenlet
45Group: Development/Libraries
46Requires: %{name} = %{version}-%{release}
47
48%description devel
49This package contains header files required for C modules development.
50
f818725e
JK
51%package -n python3-%{module}
52Summary: Lightweight in-process concurrent programming
53Group: Libraries/Python
54
55%description -n python3-%{module}
56The greenlet package is a spin-off of Stackless, a version of CPython
57that supports micro-threads called "tasklets". Tasklets run
58pseudo-concurrently (typically in a single or a few OS-level threads)
59and are synchronized with data exchanges on "channels".
60
61%package -n python3-%{module}-devel
62Summary: C development headers for python3-greenlet
63Group: Development/Libraries
64Requires: python3-%{module} = %{version}-%{release}
65
66%description -n python3-%{module}-devel
67This package contains header files required for C modules development.
68
595a528f
ER
69%prep
70%setup -q -n greenlet-%{version}
595a528f
ER
71
72%build
f818725e 73%if %{with python2}
0efef8c8 74# -fno-tree-dominator-opts becouse https://bugzilla.opensuse.org/show_bug.cgi?id=902146
595a528f 75CC="%{__cc}" \
12a27d84 76CFLAGS="%{rpmcflags} -fno-tree-dominator-opts" \
595a528f
ER
77%{__python} setup.py build
78
f818725e 79%if %{with python2_tests}
595a528f
ER
80%{__python} setup.py test
81
82# Run the upstream benchmarking suite to further exercise the code:
f818725e
JK
83PYTHONPATH=$(echo $(pwd)/build/lib.*-2.?) %{__python} benchmarks/chain.py
84%endif
85%endif
86
87%if %{with python3}
0efef8c8 88# -fno-tree-dominator-opts becouse https://bugzilla.opensuse.org/show_bug.cgi?id=902146
f818725e 89CC="%{__cc}" \
0efef8c8 90CFLAGS="%{rpmcflags} -fno-tree-dominator-opts" \
f818725e
JK
91%{__python3} setup.py build %{?with_tests:test}
92
93%if %{with tests}
94# Run the upstream benchmarking suite to further exercise the code:
95mkdir -p benchmarks-3
961cf9e4 962to3-3.4 -o benchmarks-3 -n -w --no-diffs benchmarks
f818725e 97PYTHONPATH=$(echo $(pwd)/build/lib.*-3.?) %{__python3} benchmarks-3/chain.py
595a528f
ER
98%endif
99%endif
100
101%install
f818725e
JK
102%if %{with python2}
103%{__python} setup.py \
104 install --skip-build \
595a528f
ER
105 --optimize=2 \
106 --root=$RPM_BUILD_ROOT
107
108%py_postclean
f818725e
JK
109%endif
110
111%if %{with python3}
112%{__python3} setup.py \
113 install --skip-build \
114 --optimize=2 \
115 --root=$RPM_BUILD_ROOT
116%endif
595a528f
ER
117
118%clean
119rm -rf $RPM_BUILD_ROOT
120
121%files
122%defattr(644,root,root,755)
f818725e 123%doc doc/greenlet.txt README.rst benchmarks AUTHORS NEWS LICENSE
595a528f
ER
124%attr(755,root,root) %{py_sitedir}/%{module}.so
125%{py_sitedir}/%{module}*.egg-info
126
127%files devel
128%defattr(644,root,root,755)
129%{_includedir}/python%{py_ver}/greenlet
f818725e
JK
130
131%files -n python3-%{module}
132%defattr(644,root,root,755)
133%doc doc/greenlet.txt README.rst benchmarks AUTHORS NEWS LICENSE
134%attr(755,root,root) %{py3_sitedir}/%{module}.*.so
135%{py3_sitedir}/%{module}*.egg-info
136
137%files -n python3-%{module}-devel
138%defattr(644,root,root,755)
139%{_includedir}/python%{py3_ver}*/greenlet
This page took 0.107008 seconds and 4 git commands to generate.