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