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