]> 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
f77466f5 1#
595a528f 2# Conditional build:
d74d10e7
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_without tests # unit tests and benchmarks (any)
6%bcond_without tests_py2 # CPython 2.x module tests
f818725e
JK
7
8%if %{without tests}
d74d10e7 9%undefine with_tests_py2
f818725e 10%endif
595a528f
ER
11
12%define module greenlet
13Summary: Lightweight in-process concurrent programming
f77466f5 14Summary(pl.UTF-8): Lekkie programowanie równoległe wewnątrz procesu
595a528f 15Name: python-%{module}
f0135ef3 16Version: 0.4.13
874ff606 17Release: 2
f77466f5 18License: MIT, PSF (Stackless Python parts)
f818725e 19Group: Libraries/Python
f77466f5 20#Source0Download: https://pypi.python.org/simple/greenlet/
d74d10e7 21Source0: https://files.pythonhosted.org/packages/source/g/greenlet/%{module}-%{version}.tar.gz
f0135ef3 22# Source0-md5: 6e0b9dd5385f81d478451ec8ed1d62b3
f77466f5 23URL: https://pypi.python.org/pypi/greenlet
670ee388 24BuildRequires: rpm-pythonprov
f77466f5 25BuildRequires: rpmbuild(macros) >= 1.714
f818725e 26%if %{with python2}
f77466f5 27BuildRequires: python-devel >= 1:2.4
595a528f 28BuildRequires: python-setuptools
f818725e
JK
29%endif
30%if %{with python3}
f77466f5
JB
31BuildRequires: python3-2to3 >= 1:3.2
32BuildRequires: python3-devel >= 1:3.2
0960fc6e 33BuildRequires: python3-setuptools
f77466f5 34BuildRequires: python3-modules >= 1:3.2
f818725e 35%endif
f77466f5 36Requires: python-modules >= 1:2.4
595a528f
ER
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
670ee388 39# -fno-tree-dominator-opts because https://bugzilla.opensuse.org/show_bug.cgi?id=902146
2a720b56
MK
40%define specflags_x32 -fno-tree-dominator-opts
41
595a528f
ER
42%description
43The greenlet package is a spin-off of Stackless, a version of CPython
44that supports micro-threads called "tasklets". Tasklets run
45pseudo-concurrently (typically in a single or a few OS-level threads)
46and are synchronized with data exchanges on "channels".
47
f77466f5
JB
48%description -l pl.UTF-8
49Pakiet greenlet to odprysk projektu Stackless - wersji CPythona
50obsługującej mikrowątki zwane "taskletami". Tasklety działają
51pseudorównolegle (zwykle w jednym lub kilku wątkach na poziomie
52systemu operacyjnego) i są synchronizowane przy wymianie danych
53poprzez "kanały".
54
595a528f 55%package devel
f77466f5
JB
56Summary: C development headers for Python 2 greenlet module
57Summary(pl.UTF-8): Pliki nagłówkowe C dla modułu Pythona 2 greenlet
595a528f
ER
58Group: Development/Libraries
59Requires: %{name} = %{version}-%{release}
f77466f5 60Requires: python-devel >= 1:2.4
595a528f
ER
61
62%description devel
63This package contains header files required for C modules development.
64
f77466f5
JB
65%description devel -l pl.UTF-8
66Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia modułów w
67C.
68
f818725e
JK
69%package -n python3-%{module}
70Summary: Lightweight in-process concurrent programming
f77466f5 71Summary(pl.UTF-8): Lekkie programowanie równoległe wewnątrz procesu
f818725e 72Group: Libraries/Python
f77466f5 73Requires: python3-modules >= 1:3.2
f818725e
JK
74
75%description -n python3-%{module}
76The greenlet package is a spin-off of Stackless, a version of CPython
77that supports micro-threads called "tasklets". Tasklets run
78pseudo-concurrently (typically in a single or a few OS-level threads)
79and are synchronized with data exchanges on "channels".
80
f77466f5
JB
81%description -n python3-%{module} -l pl.UTF-8
82Pakiet greenlet to odprysk projektu Stackless - wersji CPythona
83obsługującej mikrowątki zwane "taskletami". Tasklety działają
84pseudorównolegle (zwykle w jednym lub kilku wątkach na poziomie
85systemu operacyjnego) i są synchronizowane przy wymianie danych
86poprzez "kanały".
87
f818725e 88%package -n python3-%{module}-devel
f77466f5
JB
89Summary: C development headers for Python 3 greenlet module
90Summary(pl.UTF-8): Pliki nagłówkowe C dla modułu Pythona 3 greenlet
f818725e
JK
91Group: Development/Libraries
92Requires: python3-%{module} = %{version}-%{release}
f77466f5 93Requires: python3-devel >= 1:3.2
f818725e
JK
94
95%description -n python3-%{module}-devel
96This package contains header files required for C modules development.
97
f77466f5
JB
98%description -n python3-%{module}-devel -l pl.UTF-8
99Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia modułów w
100C.
101
595a528f
ER
102%prep
103%setup -q -n greenlet-%{version}
595a528f
ER
104
105%build
f818725e 106%if %{with python2}
d74d10e7 107%py_build %{?with_tests_py2:test}
595a528f 108
d74d10e7 109%if %{with tests_py2}
595a528f 110# Run the upstream benchmarking suite to further exercise the code:
f77466f5 111PYTHONPATH=$(echo $(pwd)/build-2/lib.*-2.?) %{__python} benchmarks/chain.py
f818725e
JK
112%endif
113%endif
114
115%if %{with python3}
5c11c3f5 116%py3_build %{?with_tests:test}
f818725e
JK
117
118%if %{with tests}
119# Run the upstream benchmarking suite to further exercise the code:
120mkdir -p benchmarks-3
b5e21f14 1212to3-%{py3_ver} -o benchmarks-3 -n -w --no-diffs benchmarks
f77466f5 122PYTHONPATH=$(echo $(pwd)/build-3/lib.*-3.?) %{__python3} benchmarks-3/chain.py
595a528f
ER
123%endif
124%endif
125
126%install
670ee388 127rm -rf $RPM_BUILD_ROOT
d74d10e7 128
f818725e 129%if %{with python2}
5c11c3f5 130%py_install
595a528f
ER
131
132%py_postclean
f818725e
JK
133%endif
134
135%if %{with python3}
5c11c3f5 136%py3_install
f818725e 137%endif
595a528f
ER
138
139%clean
140rm -rf $RPM_BUILD_ROOT
141
f77466f5 142%if %{with python2}
595a528f
ER
143%files
144%defattr(644,root,root,755)
f77466f5
JB
145%doc AUTHORS LICENSE NEWS README.rst doc/greenlet.txt benchmarks
146%attr(755,root,root) %{py_sitedir}/greenlet.so
147%{py_sitedir}/greenlet-%{version}-py*.egg-info
595a528f
ER
148
149%files devel
150%defattr(644,root,root,755)
151%{_includedir}/python%{py_ver}/greenlet
f77466f5 152%endif
f818725e 153
f77466f5 154%if %{with python3}
f818725e
JK
155%files -n python3-%{module}
156%defattr(644,root,root,755)
f77466f5
JB
157%doc AUTHORS LICENSE NEWS README.rst doc/greenlet.txt benchmarks-3
158%attr(755,root,root) %{py3_sitedir}/greenlet.cpython-*.so
159%{py3_sitedir}/greenlet-%{version}-py*.egg-info
f818725e
JK
160
161%files -n python3-%{module}-devel
162%defattr(644,root,root,755)
163%{_includedir}/python%{py3_ver}*/greenlet
f77466f5 164%endif
This page took 0.047585 seconds and 4 git commands to generate.