]> git.pld-linux.org Git - packages/python-distribute.git/blob - python-distribute.spec
35b49d1d6c364d202595476d846f59c20e51cb5e
[packages/python-distribute.git] / python-distribute.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %if "%{pld_release}" == "ac"
6 %bcond_with     python3 # CPython 3.x module
7 %bcond_without  pypy    # PyPy module
8 %else
9 %bcond_without  python3 # CPython 3.x module
10 %bcond_without  pypy    # PyPy module
11 %endif
12
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
19 %define         pname   distribute
20 Summary:        Easily download, build, install, upgrade, and uninstall Python packages
21 Summary(pl.UTF-8):      Łatwe ściąganie, budowanie, instalowanie, uaktualnianie i usuwanie pakietów Pythona
22 Name:           python-distribute
23 Version:        0.6.49
24 Release:        1
25 License:        PSF or ZPL
26 Group:          Development/Languages/Python
27 Source0:        https://pypi.python.org/packages/source/d/distribute/distribute-%{version}.tar.gz
28 # Source0-md5:  89e68df89faf1966bcbd99a0033fbf8e
29 URL:            https://pypi.python.org/pypi/distribute
30 %if %{with python2}
31 BuildRequires:  python
32 BuildRequires:  python-devel
33 BuildRequires:  python-modules
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3
37 BuildRequires:  python3-2to3 >= 1:3.1.1-3
38 BuildRequires:  python3-devel
39 BuildRequires:  python3-modules
40 %endif
41 %if %{with pypy}
42 BuildRequires:  pypy
43 %endif
44 BuildRequires:  rpm >= 4.4.9-56
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rpmbuild(macros) >= 1.523
47 Requires:       python-modules
48 Provides:       python-setuptools = 1:0.6-3
49 Obsoletes:      python-setuptools
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 Distribute is a fork of the Setuptools project.
54
55 Distribute is intended to replace Setuptools as the standard method
56 for working with Python module distributions.
57
58 %description -l pl.UTF-8
59 Distribute to odgałęzienie (fork) projektu Setuptools.
60
61 Distribute ma na celu zastąpienie Setuptools jako standardowej metody
62 pracy z dystrybucjami modułów Pythona.
63
64 %package -n python3-%{pname}
65 Summary:        Easily download, build, install, upgrade, and uninstall Python 3.x packages
66 Summary(pl.UTF-8):      Łatwe ściąganie, budowanie, instalowanie, uaktualnianie i usuwanie pakietów Pythona 3.x
67 Group:          Development/Languages/Python
68 Provides:       python3-setuptools = 1:0.6-3
69
70 %description -n python3-%{pname}
71 Distribute is a fork of the Setuptools project.
72
73 Distribute is intended to replace Setuptools as the standard method
74 for working with Python module distributions.
75
76 %description -n python3-%{pname} -l pl.UTF-8
77 Distribute to odgałęzienie (fork) projektu Setuptools.
78
79 Distribute ma na celu zastąpienie Setuptools jako standardowej metody
80 pracy z dystrybucjami modułów Pythona.
81
82 %package -n pypy-%{pname}
83 Summary:        Easily download, build, install, upgrade, and uninstall Python PyPy packages
84 Summary(pl.UTF-8):      Łatwe ściąganie, budowanie, instalowanie, uaktualnianie i usuwanie pakietów Pythona PyPy
85 Group:          Development/Languages/Python
86
87 %description -n pypy-%{pname}
88 Distribute is a fork of the Setuptools project.
89
90 Distribute is intended to replace Setuptools as the standard method
91 for working with Python module distributions.
92
93 %description -n pypy-%{pname} -l pl.UTF-8
94 Distribute to odgałęzienie (fork) projektu Setuptools.
95
96 Distribute ma na celu zastąpienie Setuptools jako standardowej metody
97 pracy z dystrybucjami modułów Pythona.
98
99 %prep
100 %setup -q -n %{pname}-%{version}
101
102 %build
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
115
116 %if %{with tests}
117 %{__python3} setup.py test
118 %endif
119 %endif
120
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
130 %install
131 rm -rf $RPM_BUILD_ROOT
132
133 %if %{with python2}
134 %{__python} -- setup.py \
135         build -b build-2 \
136         install \
137         --root=$RPM_BUILD_ROOT \
138         --optimize=2
139
140 # shutup check-files
141 %py_postclean
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
145 # reinstall files deleted by py_postclean
146 cp build-2/lib/setuptools/site-patch.py $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools
147 cp build-2/lib/setuptools/'script template'*.py $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools
148
149 # rename to avoid rpm dir-to-file conflict from upgrade from python-setuptools
150 egg=$(basename $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools-*.egg-info)
151 mv $RPM_BUILD_ROOT%{py_sitescriptdir}/$egg $RPM_BUILD_ROOT%{py_sitescriptdir}/S${egg#?}
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
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
164 %endif
165
166 %if %{with pypy}
167 %{__pypy} -- setup.py \
168         build -b build-pypy \
169         install \
170         --root=$RPM_BUILD_ROOT \
171         --optimize=1
172
173 mv $RPM_BUILD_ROOT%{pypy_libdir}/bin/easy_install $RPM_BUILD_ROOT%{_bindir}/easy_install-pypy-%{pypy_ver}
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
177 %endif
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %if %{with python2}
183 %files
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_bindir}/easy_install-2.*
186 %{py_sitescriptdir}/distribute-%{version}-py*.egg-info
187 %{py_sitescriptdir}/Setuptools-0.6c11-py*.egg-info
188 %{py_sitescriptdir}/easy_install.py[co]
189 %{py_sitescriptdir}/pkg_resources.py[co]
190 %dir %{py_sitescriptdir}/_markerlib
191 %{py_sitescriptdir}/_markerlib/*.py[co]
192 %dir %{py_sitescriptdir}/setuptools
193 %{py_sitescriptdir}/setuptools/*.py[co]
194 %{py_sitescriptdir}/setuptools/script*template*.py
195 %{py_sitescriptdir}/setuptools/site-patch.py
196 %dir %{py_sitescriptdir}/setuptools/command
197 %{py_sitescriptdir}/setuptools/command/*.py[co]
198 %{py_sitescriptdir}/setuptools/command/launcher*manifest.xml
199 %{py_sitescriptdir}/setuptools.pth
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.*
206 %{py3_sitescriptdir}/distribute-%{version}-py*.egg-info
207 %{py3_sitescriptdir}/setuptools-0.6c11-py*.egg-info
208 %{py3_sitescriptdir}/easy_install.py
209 %{py3_sitescriptdir}/pkg_resources.py
210 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
211 %{py3_sitescriptdir}/__pycache__/pkg_resources.*.py[co]
212 %dir %{py3_sitescriptdir}/_markerlib
213 %{py3_sitescriptdir}/_markerlib/*.py
214 %dir %{py3_sitescriptdir}/_markerlib/__pycache__
215 %{py3_sitescriptdir}/_markerlib/__pycache__/*.py[co]
216 %dir %{py3_sitescriptdir}/setuptools
217 %{py3_sitescriptdir}/setuptools/*.py
218 %dir %{py3_sitescriptdir}/setuptools/__pycache__
219 %{py3_sitescriptdir}/setuptools/__pycache__/*.py[co]
220 %dir %{py3_sitescriptdir}/setuptools/command
221 %{py3_sitescriptdir}/setuptools/command/*.py
222 %dir %{py3_sitescriptdir}/setuptools/command/__pycache__
223 %{py3_sitescriptdir}/setuptools/command/__pycache__/*.py[co]
224 %{py3_sitescriptdir}/setuptools/command/launcher*manifest.xml
225 %{py3_sitescriptdir}/setuptools.pth
226 %endif
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
233 %{pypy_sitedir}/setuptools-0.6c11-py*.egg-info
234 %{pypy_sitedir}/easy_install.py*
235 %{pypy_sitedir}/pkg_resources.py*
236 %dir %{pypy_sitedir}/_markerlib
237 %{pypy_sitedir}/_markerlib/*.py*
238 %dir %{pypy_sitedir}/setuptools
239 %{pypy_sitedir}/setuptools/*.py*
240 %dir %{pypy_sitedir}/setuptools/command
241 %{pypy_sitedir}/setuptools/command/*.py*
242 %{pypy_sitedir}/setuptools/command/launcher*manifest.xml
243 %{pypy_sitedir}/setuptools.pth
244 %endif
This page took 0.060461 seconds and 2 git commands to generate.