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