]> git.pld-linux.org Git - packages/python-distribute.git/blame - python-distribute.spec
- disable pypy
[packages/python-distribute.git] / python-distribute.spec
CommitLineData
cddd9c13
ER
1#
2# Conditional build:
461999a4
JB
3%bcond_with tests # perform "make test"
4%bcond_without python2 # CPython 2.x module
cddd9c13 5%if "%{pld_release}" == "ac"
461999a4
JB
6%bcond_with python3 # CPython 3.x module
7%bcond_without pypy # PyPy module
cddd9c13 8%else
461999a4 9%bcond_without python3 # CPython 3.x module
e2a4dd57 10%bcond_with pypy # PyPy module
cddd9c13
ER
11%endif
12
e907b4e4
JK
13%define __pypy /usr/bin/pypy
14%define pypy_ver %{expand:%%global pypy_ver %(%{__pypy} -c "import sys; print '{0}.{1}'.format(*sys.pypy_version_info[:2])" 2>/dev/null || echo ERROR)}%pypy_ver
15%define pypy_py_ver %{expand:%%global pypy_py_ver %(%{__python} -c "import sys; print sys.version[:3]" 2>/dev/null || echo ERROR)}%pypy_py_ver
16%define pypy_libdir %{expand:%%global pypy_libdir %(%{__pypy} -c "import sys; print sys.prefix" 2>/dev/null || echo ERROR)}%pypy_libdir
17%define pypy_sitedir %{pypy_libdir}/site-packages
18
5123427a
AF
19%define pname distribute
20Summary: Easily download, build, install, upgrade, and uninstall Python packages
461999a4 21Summary(pl.UTF-8): Łatwe ściąganie, budowanie, instalowanie, uaktualnianie i usuwanie pakietów Pythona
fc139994 22Name: python-distribute
81389bbd
JB
23Version: 0.6.49
24Release: 1
5123427a
AF
25License: PSF or ZPL
26Group: Development/Languages/Python
81389bbd
JB
27Source0: https://pypi.python.org/packages/source/d/distribute/distribute-%{version}.tar.gz
28# Source0-md5: 89e68df89faf1966bcbd99a0033fbf8e
29URL: https://pypi.python.org/pypi/distribute
96d02474 30%if %{with python2}
0154f75e 31BuildRequires: python
5123427a 32BuildRequires: python-devel
0154f75e 33BuildRequires: python-modules
96d02474
AF
34%endif
35%if %{with python3}
36BuildRequires: python3
37BuildRequires: python3-2to3 >= 1:3.1.1-3
38BuildRequires: python3-devel
39BuildRequires: python3-modules
40%endif
e907b4e4
JK
41%if %{with pypy}
42BuildRequires: pypy
43%endif
cddd9c13 44BuildRequires: rpm >= 4.4.9-56
0154f75e 45BuildRequires: rpm-pythonprov
5eeafe98 46BuildRequires: rpmbuild(macros) >= 1.523
ffb23396 47Requires: python-modules
5123427a 48Provides: python-setuptools = 1:0.6-3
fc139994 49Obsoletes: python-setuptools
5123427a
AF
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
53Distribute is a fork of the Setuptools project.
54
0154f75e 55Distribute is intended to replace Setuptools as the standard method
56for working with Python module distributions.
57
461999a4
JB
58%description -l pl.UTF-8
59Distribute to odgałęzienie (fork) projektu Setuptools.
60
61Distribute ma na celu zastąpienie Setuptools jako standardowej metody
62pracy z dystrybucjami modułów Pythona.
63
96d02474 64%package -n python3-%{pname}
461999a4
JB
65Summary: Easily download, build, install, upgrade, and uninstall Python 3.x packages
66Summary(pl.UTF-8): Łatwe ściąganie, budowanie, instalowanie, uaktualnianie i usuwanie pakietów Pythona 3.x
96d02474 67Group: Development/Languages/Python
0a863587 68Provides: python3-setuptools = 1:0.6-3
96d02474
AF
69
70%description -n python3-%{pname}
71Distribute is a fork of the Setuptools project.
72
73Distribute is intended to replace Setuptools as the standard method
74for working with Python module distributions.
75
461999a4
JB
76%description -n python3-%{pname} -l pl.UTF-8
77Distribute to odgałęzienie (fork) projektu Setuptools.
78
79Distribute ma na celu zastąpienie Setuptools jako standardowej metody
80pracy z dystrybucjami modułów Pythona.
81
e907b4e4 82%package -n pypy-%{pname}
461999a4
JB
83Summary: Easily download, build, install, upgrade, and uninstall Python PyPy packages
84Summary(pl.UTF-8): Łatwe ściąganie, budowanie, instalowanie, uaktualnianie i usuwanie pakietów Pythona PyPy
e907b4e4
JK
85Group: Development/Languages/Python
86
87%description -n pypy-%{pname}
88Distribute is a fork of the Setuptools project.
89
90Distribute is intended to replace Setuptools as the standard method
91for working with Python module distributions.
92
461999a4
JB
93%description -n pypy-%{pname} -l pl.UTF-8
94Distribute to odgałęzienie (fork) projektu Setuptools.
95
96Distribute ma na celu zastąpienie Setuptools jako standardowej metody
97pracy z dystrybucjami modułów Pythona.
98
5123427a
AF
99%prep
100%setup -q -n %{pname}-%{version}
101
102%build
96d02474
AF
103%if %{with python2}
104%{__python} setup.py \
105 build -b build-2
106
107%if %{with tests}
108%{__python} setup.py test
109%endif
110%endif
111
112%if %{with python3}
113%{__python3} setup.py \
114 build -b build-3
5123427a
AF
115
116%if %{with tests}
96d02474
AF
117%{__python3} setup.py test
118%endif
5123427a
AF
119%endif
120
e907b4e4
JK
121%if %{with pypy}
122%{__pypy} setup.py \
123 build -b build-pypy
124
125%if %{with tests}
126%{__pypy} setup.py test
127%endif
128%endif
129
5123427a
AF
130%install
131rm -rf $RPM_BUILD_ROOT
e907b4e4 132
96d02474
AF
133%if %{with python2}
134%{__python} -- setup.py \
135 build -b build-2 \
136 install \
5123427a
AF
137 --root=$RPM_BUILD_ROOT \
138 --optimize=2
139
140# shutup check-files
141%py_postclean
461999a4
JB
142%{__rm} $RPM_BUILD_ROOT%{_bindir}/easy_install
143%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools/*.exe
144%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools/tests
81389bbd
JB
145# reinstall files deleted by py_postclean
146cp build-2/lib/setuptools/site-patch.py $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools
013d4afa 147cp build-2/lib/setuptools/'script template'*.py $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools
c392e01d
ER
148
149# rename to avoid rpm dir-to-file conflict from upgrade from python-setuptools
150egg=$(basename $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools-*.egg-info)
151mv $RPM_BUILD_ROOT%{py_sitescriptdir}/$egg $RPM_BUILD_ROOT%{py_sitescriptdir}/S${egg#?}
96d02474
AF
152%endif
153
154%if %{with python3}
155%{__python3} -- setup.py \
156 build -b build-3 \
157 install \
158 --root=$RPM_BUILD_ROOT \
159 --optimize=2
160
461999a4
JB
161%{__rm} $RPM_BUILD_ROOT%{_bindir}/easy_install
162%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/setuptools/*.exe
163%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/setuptools/tests
96d02474 164%endif
5123427a 165
e907b4e4
JK
166%if %{with pypy}
167%{__pypy} -- setup.py \
168 build -b build-pypy \
169 install \
170 --root=$RPM_BUILD_ROOT \
171 --optimize=1
172
db3a3c6e 173mv $RPM_BUILD_ROOT%{pypy_libdir}/bin/easy_install $RPM_BUILD_ROOT%{_bindir}/easy_install-pypy-%{pypy_ver}
461999a4
JB
174%{__rm} $RPM_BUILD_ROOT%{pypy_libdir}/bin/easy_install*
175%{__rm} $RPM_BUILD_ROOT%{pypy_sitedir}/setuptools/*.exe
176%{__rm} -r $RPM_BUILD_ROOT%{pypy_sitedir}/setuptools/tests
e907b4e4
JK
177%endif
178
5123427a
AF
179%clean
180rm -rf $RPM_BUILD_ROOT
181
96d02474 182%if %{with python2}
5123427a
AF
183%files
184%defattr(644,root,root,755)
5123427a 185%attr(755,root,root) %{_bindir}/easy_install-2.*
c392e01d 186%{py_sitescriptdir}/distribute-%{version}-py*.egg-info
461999a4 187%{py_sitescriptdir}/Setuptools-0.6c11-py*.egg-info
5123427a 188%{py_sitescriptdir}/easy_install.py[co]
461999a4 189%{py_sitescriptdir}/pkg_resources.py[co]
826e1b47
ŁK
190%dir %{py_sitescriptdir}/_markerlib
191%{py_sitescriptdir}/_markerlib/*.py[co]
461999a4 192%dir %{py_sitescriptdir}/setuptools
5123427a 193%{py_sitescriptdir}/setuptools/*.py[co]
81389bbd
JB
194%{py_sitescriptdir}/setuptools/script*template*.py
195%{py_sitescriptdir}/setuptools/site-patch.py
461999a4 196%dir %{py_sitescriptdir}/setuptools/command
5123427a 197%{py_sitescriptdir}/setuptools/command/*.py[co]
81389bbd 198%{py_sitescriptdir}/setuptools/command/launcher*manifest.xml
461999a4 199%{py_sitescriptdir}/setuptools.pth
96d02474
AF
200%endif
201
202%if %{with python3}
203%files -n python3-%{pname}
204%defattr(644,root,root,755)
205%attr(755,root,root) %{_bindir}/easy_install-3.*
c392e01d 206%{py3_sitescriptdir}/distribute-%{version}-py*.egg-info
461999a4 207%{py3_sitescriptdir}/setuptools-0.6c11-py*.egg-info
7ab69460 208%{py3_sitescriptdir}/easy_install.py
461999a4 209%{py3_sitescriptdir}/pkg_resources.py
7ab69460 210%{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
461999a4 211%{py3_sitescriptdir}/__pycache__/pkg_resources.*.py[co]
826e1b47
ŁK
212%dir %{py3_sitescriptdir}/_markerlib
213%{py3_sitescriptdir}/_markerlib/*.py
214%dir %{py3_sitescriptdir}/_markerlib/__pycache__
215%{py3_sitescriptdir}/_markerlib/__pycache__/*.py[co]
461999a4 216%dir %{py3_sitescriptdir}/setuptools
7ab69460 217%{py3_sitescriptdir}/setuptools/*.py
461999a4 218%dir %{py3_sitescriptdir}/setuptools/__pycache__
7ab69460 219%{py3_sitescriptdir}/setuptools/__pycache__/*.py[co]
461999a4 220%dir %{py3_sitescriptdir}/setuptools/command
7ab69460 221%{py3_sitescriptdir}/setuptools/command/*.py
461999a4
JB
222%dir %{py3_sitescriptdir}/setuptools/command/__pycache__
223%{py3_sitescriptdir}/setuptools/command/__pycache__/*.py[co]
81389bbd 224%{py3_sitescriptdir}/setuptools/command/launcher*manifest.xml
461999a4 225%{py3_sitescriptdir}/setuptools.pth
7ab69460 226%endif
e907b4e4
JK
227
228%if %{with pypy}
229%files -n pypy-%{pname}
230%defattr(644,root,root,755)
231%attr(755,root,root) %{_bindir}/easy_install-pypy*
232%{pypy_sitedir}/distribute-%{version}-py*.egg-info
461999a4
JB
233%{pypy_sitedir}/setuptools-0.6c11-py*.egg-info
234%{pypy_sitedir}/easy_install.py*
e907b4e4 235%{pypy_sitedir}/pkg_resources.py*
826e1b47
ŁK
236%dir %{pypy_sitedir}/_markerlib
237%{pypy_sitedir}/_markerlib/*.py*
461999a4 238%dir %{pypy_sitedir}/setuptools
e907b4e4 239%{pypy_sitedir}/setuptools/*.py*
461999a4 240%dir %{pypy_sitedir}/setuptools/command
e907b4e4 241%{pypy_sitedir}/setuptools/command/*.py*
81389bbd 242%{pypy_sitedir}/setuptools/command/launcher*manifest.xml
461999a4 243%{pypy_sitedir}/setuptools.pth
e907b4e4 244%endif
This page took 0.123072 seconds and 4 git commands to generate.