]> git.pld-linux.org Git - packages/python-greenlet.git/blame - python-greenlet.spec
- updated to 1.1.2 (1.1.x already required by python-gevent in Th)
[packages/python-greenlet.git] / python-greenlet.spec
CommitLineData
f77466f5 1#
595a528f 2# Conditional build:
d74d10e7
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
4d60538c 5%bcond_without doc # Sphinx documentation
d74d10e7
JB
6%bcond_without tests # unit tests and benchmarks (any)
7%bcond_without tests_py2 # CPython 2.x module tests
f818725e
JK
8
9%if %{without tests}
d74d10e7 10%undefine with_tests_py2
f818725e 11%endif
595a528f
ER
12
13%define module greenlet
14Summary: Lightweight in-process concurrent programming
f77466f5 15Summary(pl.UTF-8): Lekkie programowanie równoległe wewnątrz procesu
595a528f 16Name: python-%{module}
7b8a5d63
JB
17Version: 1.1.2
18Release: 1
f77466f5 19License: MIT, PSF (Stackless Python parts)
f818725e 20Group: Libraries/Python
6fa6396c 21#Source0Download: https://pypi.org/simple/greenlet/
d74d10e7 22Source0: https://files.pythonhosted.org/packages/source/g/greenlet/%{module}-%{version}.tar.gz
7b8a5d63 23# Source0-md5: f424fbd9afeed575dd2ba5f0ac66e30b
4d60538c 24Patch0: %{name}-py3.8.patch
6fa6396c 25URL: https://pypi.org/project/greenlet/
670ee388 26BuildRequires: rpm-pythonprov
f77466f5 27BuildRequires: rpmbuild(macros) >= 1.714
f818725e 28%if %{with python2}
7b8a5d63 29BuildRequires: python-devel >= 1:2.7
595a528f 30BuildRequires: python-setuptools
f818725e
JK
31%endif
32%if %{with python3}
7b8a5d63
JB
33BuildRequires: python3-2to3 >= 1:3.5
34BuildRequires: python3-devel >= 1:3.5
0960fc6e 35BuildRequires: python3-setuptools
7b8a5d63 36BuildRequires: python3-modules >= 1:3.5
f818725e 37%endif
4d60538c 38%if %{with doc}
7b8a5d63 39BuildRequires: sphinx-pdg-3
4d60538c 40%endif
7b8a5d63 41Requires: python-modules >= 1:2.7
595a528f
ER
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
670ee388 44# -fno-tree-dominator-opts because https://bugzilla.opensuse.org/show_bug.cgi?id=902146
2a720b56
MK
45%define specflags_x32 -fno-tree-dominator-opts
46
595a528f
ER
47%description
48The greenlet package is a spin-off of Stackless, a version of CPython
49that supports micro-threads called "tasklets". Tasklets run
50pseudo-concurrently (typically in a single or a few OS-level threads)
51and are synchronized with data exchanges on "channels".
52
f77466f5
JB
53%description -l pl.UTF-8
54Pakiet greenlet to odprysk projektu Stackless - wersji CPythona
55obsługującej mikrowątki zwane "taskletami". Tasklety działają
56pseudorównolegle (zwykle w jednym lub kilku wątkach na poziomie
57systemu operacyjnego) i są synchronizowane przy wymianie danych
58poprzez "kanały".
59
595a528f 60%package devel
f77466f5
JB
61Summary: C development headers for Python 2 greenlet module
62Summary(pl.UTF-8): Pliki nagłówkowe C dla modułu Pythona 2 greenlet
595a528f
ER
63Group: Development/Libraries
64Requires: %{name} = %{version}-%{release}
7b8a5d63 65Requires: python-devel >= 1:2.7
595a528f
ER
66
67%description devel
68This package contains header files required for C modules development.
69
f77466f5
JB
70%description devel -l pl.UTF-8
71Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia modułów w
72C.
73
f818725e
JK
74%package -n python3-%{module}
75Summary: Lightweight in-process concurrent programming
f77466f5 76Summary(pl.UTF-8): Lekkie programowanie równoległe wewnątrz procesu
f818725e 77Group: Libraries/Python
7b8a5d63 78Requires: python3-modules >= 1:3.5
f818725e
JK
79
80%description -n python3-%{module}
81The greenlet package is a spin-off of Stackless, a version of CPython
82that supports micro-threads called "tasklets". Tasklets run
83pseudo-concurrently (typically in a single or a few OS-level threads)
84and are synchronized with data exchanges on "channels".
85
f77466f5
JB
86%description -n python3-%{module} -l pl.UTF-8
87Pakiet greenlet to odprysk projektu Stackless - wersji CPythona
88obsługującej mikrowątki zwane "taskletami". Tasklety działają
89pseudorównolegle (zwykle w jednym lub kilku wątkach na poziomie
90systemu operacyjnego) i są synchronizowane przy wymianie danych
91poprzez "kanały".
92
f818725e 93%package -n python3-%{module}-devel
f77466f5
JB
94Summary: C development headers for Python 3 greenlet module
95Summary(pl.UTF-8): Pliki nagłówkowe C dla modułu Pythona 3 greenlet
f818725e
JK
96Group: Development/Libraries
97Requires: python3-%{module} = %{version}-%{release}
7b8a5d63 98Requires: python3-devel >= 1:3.5
f818725e
JK
99
100%description -n python3-%{module}-devel
101This package contains header files required for C modules development.
102
f77466f5
JB
103%description -n python3-%{module}-devel -l pl.UTF-8
104Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia modułów w
105C.
106
4d60538c
JB
107%package apidocs
108Summary: API documentation for Python greenlet module
109Summary(pl.UTF-8): Dokumentacja API modułu Pythona greenlet
110Group: Documentation
111
112%description apidocs
113API documentation for Python greenlet module.
114
115%description apidocs -l pl.UTF-8
116Dokumentacja API modułu Pythona greenlet.
117
595a528f
ER
118%prep
119%setup -q -n greenlet-%{version}
4d60538c 120%patch0 -p1
595a528f
ER
121
122%build
f818725e 123%if %{with python2}
4d60538c 124%py_build
595a528f 125
d74d10e7 126%if %{with tests_py2}
4d60538c
JB
127BUILDDIR=$(echo $(pwd)/build-2/lib.linux-*)
128PYTHONPATH="$BUILDDIR" \
7b8a5d63 129%{__python} -m unittest discover greenlet.tests
00329535 130
4d60538c
JB
131# Run the upstream benchmarking suite to further exercise the code:
132PYTHONPATH="$BUILDDIR" \
133%{__python} benchmarks/chain.py
f818725e
JK
134%endif
135%endif
136
137%if %{with python3}
4d60538c 138%py3_build
f818725e
JK
139
140%if %{with tests}
4d60538c
JB
141BUILDDIR=$(echo $(pwd)/build-3/lib.linux-*)
142PYTHONPATH="$BUILDDIR" \
7b8a5d63 143%{__python3} -m unittest discover greenlet.tests
4d60538c 144
f818725e
JK
145# Run the upstream benchmarking suite to further exercise the code:
146mkdir -p benchmarks-3
b5e21f14 1472to3-%{py3_ver} -o benchmarks-3 -n -w --no-diffs benchmarks
4d60538c
JB
148PYTHONPATH="$BUILDDIR" \
149%{__python3} benchmarks-3/chain.py
150%endif
595a528f 151%endif
4d60538c
JB
152
153%if %{with doc}
7b8a5d63
JB
154PYTHONPATH=$(echo $(pwd)/build-3/lib.linux-*) \
155%{__make} -C docs html \
156 SPHINXBUILD=sphinx-build-3
595a528f
ER
157%endif
158
159%install
670ee388 160rm -rf $RPM_BUILD_ROOT
d74d10e7 161
f818725e 162%if %{with python2}
5c11c3f5 163%py_install
595a528f 164
7b8a5d63
JB
165%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/greenlet/*.[ch]
166%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/greenlet/{platform,tests}
595a528f 167%py_postclean
f818725e
JK
168%endif
169
170%if %{with python3}
5c11c3f5 171%py3_install
7b8a5d63
JB
172
173%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/greenlet/*.[ch]
174%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/greenlet/{platform,tests}
f818725e 175%endif
595a528f
ER
176
177%clean
178rm -rf $RPM_BUILD_ROOT
179
f77466f5 180%if %{with python2}
595a528f
ER
181%files
182%defattr(644,root,root,755)
7b8a5d63
JB
183%doc AUTHORS CHANGES.rst LICENSE README.rst benchmarks
184%dir %{py_sitedir}/greenlet
185%attr(755,root,root) %{py_sitedir}/greenlet/_greenlet.so
186%{py_sitedir}/greenlet/*.py[co]
f77466f5 187%{py_sitedir}/greenlet-%{version}-py*.egg-info
595a528f
ER
188
189%files devel
190%defattr(644,root,root,755)
191%{_includedir}/python%{py_ver}/greenlet
f77466f5 192%endif
f818725e 193
f77466f5 194%if %{with python3}
f818725e
JK
195%files -n python3-%{module}
196%defattr(644,root,root,755)
7b8a5d63
JB
197%doc AUTHORS CHANGES.rst LICENSE README.rst %{?with_tests:benchmarks-3}
198%dir %{py3_sitedir}/greenlet
199%attr(755,root,root) %{py3_sitedir}/greenlet/_greenlet.cpython-*.so
200%{py3_sitedir}/greenlet/*.py
201%{py3_sitedir}/greenlet/__pycache__
f77466f5 202%{py3_sitedir}/greenlet-%{version}-py*.egg-info
f818725e
JK
203
204%files -n python3-%{module}-devel
205%defattr(644,root,root,755)
206%{_includedir}/python%{py3_ver}*/greenlet
f77466f5 207%endif
4d60538c
JB
208
209%if %{with doc}
210%files apidocs
211%defattr(644,root,root,755)
7b8a5d63 212%doc docs/_build/html/{_modules,_static,*.html,*.js}
4d60538c 213%endif
This page took 0.181175 seconds and 4 git commands to generate.