]> git.pld-linux.org Git - packages/python-greenlet.git/blame - python-greenlet.spec
- python 3.6
[packages/python-greenlet.git] / python-greenlet.spec
CommitLineData
f77466f5 1#
595a528f
ER
2# Conditional build:
3%bcond_without tests # do not perform "make test"
f818725e
JK
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6%bcond_without python2_tests # CPython 2.x module tests
7
8%if %{without tests}
9%undefine with_python2_tests
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}
0ecf5f31 16Version: 0.4.9
42d1cc4c 17Release: 3
f77466f5 18License: MIT, PSF (Stackless Python parts)
f818725e 19Group: Libraries/Python
f77466f5
JB
20#Source0Download: https://pypi.python.org/simple/greenlet/
21Source0: https://pypi.python.org/packages/source/g/greenlet/%{module}-%{version}.zip
0ecf5f31 22# Source0-md5: c6659cdb2a5e591723e629d2eef22e82
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}
595a528f 107CC="%{__cc}" \
2a720b56 108CFLAGS="%{rpmcflags} " \
f77466f5 109%py_build %{?with_python2_tests:test}
595a528f 110
f818725e 111%if %{with python2_tests}
595a528f 112# Run the upstream benchmarking suite to further exercise the code:
f77466f5 113PYTHONPATH=$(echo $(pwd)/build-2/lib.*-2.?) %{__python} benchmarks/chain.py
f818725e
JK
114%endif
115%endif
116
117%if %{with python3}
5c11c3f5 118%py3_build %{?with_tests:test}
f818725e
JK
119
120%if %{with tests}
121# Run the upstream benchmarking suite to further exercise the code:
122mkdir -p benchmarks-3
b5e21f14 1232to3-%{py3_ver} -o benchmarks-3 -n -w --no-diffs benchmarks
f77466f5 124PYTHONPATH=$(echo $(pwd)/build-3/lib.*-3.?) %{__python3} benchmarks-3/chain.py
595a528f
ER
125%endif
126%endif
127
128%install
670ee388 129rm -rf $RPM_BUILD_ROOT
f818725e 130%if %{with python2}
5c11c3f5 131%py_install
595a528f
ER
132
133%py_postclean
f818725e
JK
134%endif
135
136%if %{with python3}
5c11c3f5 137%py3_install
f818725e 138%endif
595a528f
ER
139
140%clean
141rm -rf $RPM_BUILD_ROOT
142
f77466f5 143%if %{with python2}
595a528f
ER
144%files
145%defattr(644,root,root,755)
f77466f5
JB
146%doc AUTHORS LICENSE NEWS README.rst doc/greenlet.txt benchmarks
147%attr(755,root,root) %{py_sitedir}/greenlet.so
148%{py_sitedir}/greenlet-%{version}-py*.egg-info
595a528f
ER
149
150%files devel
151%defattr(644,root,root,755)
152%{_includedir}/python%{py_ver}/greenlet
f77466f5 153%endif
f818725e 154
f77466f5 155%if %{with python3}
f818725e
JK
156%files -n python3-%{module}
157%defattr(644,root,root,755)
f77466f5
JB
158%doc AUTHORS LICENSE NEWS README.rst doc/greenlet.txt benchmarks-3
159%attr(755,root,root) %{py3_sitedir}/greenlet.cpython-*.so
160%{py3_sitedir}/greenlet-%{version}-py*.egg-info
f818725e
JK
161
162%files -n python3-%{module}-devel
163%defattr(644,root,root,755)
164%{_includedir}/python%{py3_ver}*/greenlet
f77466f5 165%endif
This page took 0.161574 seconds and 4 git commands to generate.