]> git.pld-linux.org Git - packages/python-greenlet.git/blob - python-greenlet.spec
Release 3. Moved -fno-tree-dominator-opts to specflags_x32
[packages/python-greenlet.git] / python-greenlet.spec
1 # Conditional build:
2 %bcond_without  tests   # do not perform "make test"
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  python2_tests # CPython 2.x module tests
6
7 %if %{without tests}
8 %undefine       with_python2_tests
9 %endif
10
11 %define         module  greenlet
12 Summary:        Lightweight in-process concurrent programming
13 Name:           python-%{module}
14 Version:        0.4.5
15 Release:        3
16 License:        MIT & PSF
17 Group:          Libraries/Python
18 URL:            http://pypi.python.org/pypi/greenlet
19 Source0:        http://pypi.python.org/packages/source/g/greenlet/%{module}-%{version}.zip
20 # Source0-md5:  ce383f6475e6311cf8932ea779938703
21 %if %{with python2}
22 BuildRequires:  python-devel
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-2to3
27 BuildRequires:  python3-devel
28 BuildRequires:  python3-distribute
29 BuildRequires:  python3-modules
30 %endif
31 BuildRequires:  rpmbuild(macros) >= 1.219
32 BuildRequires:  rpm-pythonprov
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 # -fno-tree-dominator-opts becouse https://bugzilla.opensuse.org/show_bug.cgi?id=902146
36 %define         specflags_x32   -fno-tree-dominator-opts
37
38 %description
39 The greenlet package is a spin-off of Stackless, a version of CPython
40 that supports micro-threads called "tasklets". Tasklets run
41 pseudo-concurrently (typically in a single or a few OS-level threads)
42 and are synchronized with data exchanges on "channels".
43
44 %package devel
45 Summary:        C development headers for python-greenlet
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48
49 %description devel
50 This package contains header files required for C modules development.
51
52 %package -n python3-%{module}
53 Summary:        Lightweight in-process concurrent programming
54 Group:          Libraries/Python
55
56 %description -n python3-%{module}
57 The greenlet package is a spin-off of Stackless, a version of CPython
58 that supports micro-threads called "tasklets". Tasklets run
59 pseudo-concurrently (typically in a single or a few OS-level threads)
60 and are synchronized with data exchanges on "channels".
61
62 %package -n python3-%{module}-devel
63 Summary:        C development headers for python3-greenlet
64 Group:          Development/Libraries
65 Requires:       python3-%{module} = %{version}-%{release}
66
67 %description -n python3-%{module}-devel
68 This package contains header files required for C modules development.
69
70 %prep
71 %setup -q -n greenlet-%{version}
72
73 %build
74 %if %{with python2}
75 CC="%{__cc}" \
76 CFLAGS="%{rpmcflags} " \
77 %{__python} setup.py build
78
79 %if %{with python2_tests}
80 %{__python} setup.py test
81
82 # Run the upstream benchmarking suite to further exercise the code:
83 PYTHONPATH=$(echo $(pwd)/build/lib.*-2.?) %{__python} benchmarks/chain.py
84 %endif
85 %endif
86
87 %if %{with python3}
88 CC="%{__cc}" \
89 CFLAGS="%{rpmcflags}" \
90 %{__python3} setup.py build %{?with_tests:test}
91
92 %if %{with tests}
93 # Run the upstream benchmarking suite to further exercise the code:
94 mkdir -p benchmarks-3
95 2to3-3.4 -o benchmarks-3 -n -w --no-diffs benchmarks
96 PYTHONPATH=$(echo $(pwd)/build/lib.*-3.?) %{__python3} benchmarks-3/chain.py
97 %endif
98 %endif
99
100 %install
101 %if %{with python2}
102 %{__python} setup.py \
103         install --skip-build \
104         --optimize=2 \
105         --root=$RPM_BUILD_ROOT
106
107 %py_postclean
108 %endif
109
110 %if %{with python3}
111 %{__python3} setup.py \
112         install --skip-build \
113         --optimize=2 \
114         --root=$RPM_BUILD_ROOT
115 %endif
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(644,root,root,755)
122 %doc doc/greenlet.txt README.rst benchmarks AUTHORS NEWS LICENSE
123 %attr(755,root,root) %{py_sitedir}/%{module}.so
124 %{py_sitedir}/%{module}*.egg-info
125
126 %files devel
127 %defattr(644,root,root,755)
128 %{_includedir}/python%{py_ver}/greenlet
129
130 %files -n python3-%{module}
131 %defattr(644,root,root,755)
132 %doc doc/greenlet.txt README.rst benchmarks AUTHORS NEWS LICENSE
133 %attr(755,root,root) %{py3_sitedir}/%{module}.*.so
134 %{py3_sitedir}/%{module}*.egg-info
135
136 %files -n python3-%{module}-devel
137 %defattr(644,root,root,755)
138 %{_includedir}/python%{py3_ver}*/greenlet
This page took 0.066714 seconds and 3 git commands to generate.