]> git.pld-linux.org Git - packages/python-setuptools.git/blob - python-setuptools.spec
f7231b4d4f220e9324b37cbd31a1845dd743e690
[packages/python-setuptools.git] / python-setuptools.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs # sphinx based documentation
4 %bcond_with     tests   # "test" action (fails?)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  setuptools
9 Summary:        A collection of enhancements to the Python distutils
10 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
11 Name:           python-setuptools
12 Version:        7.0
13 Release:        2
14 Epoch:          1
15 License:        PSF or ZPL
16 Group:          Development/Languages/Python
17 Source0:        https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
18 # Source0-md5:  6245d6752e2ef803c365f560f7f2f940
19 URL:            https://bitbucket.org/pypa/setuptools
20 %if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?)
21 BuildRequires:  glibc-localedb-all
22 %endif
23 %if %{with python2}
24 BuildRequires:  python-distribute
25 BuildRequires:  python-modules >= 1:2.6
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-distribute
29 BuildRequires:  python3-modules >= 1:3.2
30 %endif
31 BuildRequires:  rpm-pythonprov
32 Requires:       python-modules >= 1:2.6
33 Obsoletes:      python-distribute
34 Obsoletes:      python-setuptools-devel
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 setuptools is a collection of enhancements to the Python distutils
40 that allow you to more easily build and distribute Python 2.x
41 packages, especially ones that have dependencies on other packages.
42
43 %description -l pl.UTF-8
44 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
45 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
46 szczególnie tych mających zależności od innych pakietów.
47
48 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
49 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
50 Pythona 2.x.
51
52 %package -n python3-%{module}
53 Summary:        A collection of enhancements to the Python distutils
54 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
55 Group:          Libraries/Python
56 Requires:       python3-modules >= 1:3.2
57
58 %description -n python3-%{module}
59 setuptools is a collection of enhancements to the Python distutils
60 that allow you to more easily build and distribute Python 3.x
61 packages, especially ones that have dependencies on other packages.
62
63 %description -n python3-%{module} -l pl.UTF-8
64 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
65 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
66 szczególnie tych mających zależności od innych pakietów.
67
68 %package apidocs
69 Summary:        %{module} API documentation
70 Summary(pl.UTF-8):      Dokumentacja API %{module}
71 Group:          Documentation
72
73 %description apidocs
74 API documentation for %{module}.
75
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API %{module}.
78
79 %prep
80 %setup -q -n %{module}-%{version}
81
82 %build
83 %if %{with python2}
84 LC_ALL=en_US.UTF-8 \
85 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
86 %endif
87
88 %if %{with python3}
89 LC_ALL=en_US.UTF-8 \
90 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
91 %endif
92
93 %if %{with apidocs}
94 %{__make} -C docs html
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python3}
101 %{__python3} setup.py \
102         build --build-base build-3 \
103         install --skip-build \
104         --optimize=2 \
105         --root=$RPM_BUILD_ROOT
106 %endif
107
108 %if %{with python2}
109 %{__python} setup.py \
110         build --build-base build-2 \
111         install --skip-build \
112         --optimize=2 \
113         --root=$RPM_BUILD_ROOT
114
115 %py_postclean
116 %endif
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %files
123 %defattr(644,root,root,755)
124 %doc CHANGES.txt README.txt DEVGUIDE.txt
125 %attr(755,root,root) %{_bindir}/easy_install
126 %attr(755,root,root) %{_bindir}/easy_install-2.*
127 %{py_sitescriptdir}/%{module}
128 %{py_sitescriptdir}/_markerlib
129 %{py_sitescriptdir}/easy_install.py[co]
130 %{py_sitescriptdir}/pkg_resources.py[co]
131 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
132 %endif
133
134 %if %{with python3}
135 %files -n python3-%{module}
136 %defattr(644,root,root,755)
137 %doc CHANGES.txt README.txt DEVGUIDE.txt
138 %attr(755,root,root) %{_bindir}/easy_install-3.*
139 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
140 %{py3_sitescriptdir}/__pycache__/pkg_resources.*.py[co]
141 %{py3_sitescriptdir}/%{module}
142 %{py3_sitescriptdir}/_markerlib
143 %{py3_sitescriptdir}/easy_install.py
144 %{py3_sitescriptdir}/pkg_resources.py
145 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
146 %endif
147
148 %if %{with apidocs}
149 %files apidocs
150 %defattr(644,root,root,755)
151 %doc docs/build/html/*
152 %endif
This page took 0.076109 seconds and 2 git commands to generate.