]> git.pld-linux.org Git - packages/python-setuptools.git/blob - python-setuptools.spec
2d6bd8a9198d6ee1a51597b952724eb95ae82e73
[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, pytest-runner doesn't support build-base)
5 %bcond_without  python2         # CPython 2.x module
6 %bcond_without  python3         # CPython 3.x module
7 %bcond_without  python3_default # Use Python 3.x for easy_install executable
8
9 %if %{without python3}
10 %undefine       python3_default
11 %endif
12
13 %define         module  setuptools
14 Summary:        A collection of enhancements to the Python distutils
15 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
16 Name:           python-setuptools
17 Version:        21.0.0
18 Release:        2
19 Epoch:          1
20 License:        PSF or ZPL
21 Group:          Development/Languages/Python
22 #Source0Download: https://pypi.python.org/simple/setuptools/
23 Source0:        https://pypi.python.org/packages/ff/d4/209f4939c49e31f5524fa0027bf1c8ec3107abaf7c61fdaad704a648c281/setuptools-%{version}.tar.gz
24 # Source0-md5:  81964fdb89534118707742e6d1a1ddb4
25 Patch0:         %{name}-missing.patch
26 URL:            https://github.com/pypa/setuptools
27 %if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?)
28 BuildRequires:  glibc-localedb-all
29 %endif
30 %if %{with python2}
31 BuildRequires:  python-modules >= 1:2.6
32 BuildConflicts: python-distribute < 0.7
33 %if %{with tests}
34 BuildRequires:  python-mock
35 BuildRequires:  python-pytest >= 2.8
36 BuildRequires:  python-pytest-runner
37 %endif
38 %endif
39 %if %{with python3}
40 BuildRequires:  python3-modules >= 1:3.2
41 BuildConflicts: python3-distribute < 0.7
42 %if %{with tests}
43 %if "%{py3_ver}" < "3.3"
44 BuildRequires:  python3-mock
45 %endif
46 BuildRequires:  python3-pytest >= 2.8
47 BuildRequires:  python3-pytest-runner
48 %endif
49 %endif
50 %if %{with apidocs}
51 BuildRequires:  python3-rst.linker >= 1.4
52 BuildRequires:  sphinx-pdg-3
53 %endif
54 BuildRequires:  rpm-pythonprov
55 BuildRequires:  rpmbuild(macros) >= 1.710
56 Requires:       python-modules >= 1:2.6
57 Obsoletes:      python-distribute < 0.7
58 Obsoletes:      python-setuptools-devel
59 BuildArch:      noarch
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
63 setuptools is a collection of enhancements to the Python distutils
64 that allow you to more easily build and distribute Python 2.x
65 packages, especially ones that have dependencies on other packages.
66
67 %description -l pl.UTF-8
68 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
69 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
70 szczególnie tych mających zależności od innych pakietów.
71
72 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
73 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
74 Pythona 2.x.
75
76 %package -n python3-%{module}
77 Summary:        A collection of enhancements to the Python distutils
78 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
79 Group:          Libraries/Python
80 Requires:       python3-modules >= 1:3.2
81 Obsoletes:      python3-distribute < 0.7
82
83 %description -n python3-%{module}
84 setuptools is a collection of enhancements to the Python distutils
85 that allow you to more easily build and distribute Python 3.x
86 packages, especially ones that have dependencies on other packages.
87
88 %description -n python3-%{module} -l pl.UTF-8
89 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
90 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
91 szczególnie tych mających zależności od innych pakietów.
92
93 %package -n easy_install
94 Summary:        Python software installer
95 Summary(pl.UTF-8):      Instalator oprogramowania napisanego w Pythonie
96 Group:          Libraries/Python
97 %if %{with python3_default}
98 Requires:       python3-%{module} = %{epoch}:%{version}-%{release}
99 %else
100 Requires:       python-%{module} = %{epoch}:%{version}-%{release}
101 %endif
102 Conflicts:      python-setuptools < 1:18.6.1-2
103
104 %description -n easy_install
105 Python software installer.
106
107 %description -n easy_install -l pl.UTF-8
108 Instalator oprogramowania napisanego w Pythonie.
109
110 %package apidocs
111 Summary:        %{module} API documentation
112 Summary(pl.UTF-8):      Dokumentacja API %{module}
113 Group:          Documentation
114
115 %description apidocs
116 API documentation for %{module}.
117
118 %description apidocs -l pl.UTF-8
119 Dokumentacja API %{module}.
120
121 %prep
122 %setup -q -n %{module}-%{version}
123 %patch0 -p1
124
125 %build
126 %if %{with python2}
127 LC_ALL=en_US.UTF-8 \
128 %py_build %{?with_tests:test}
129 %endif
130
131 %if %{with python3}
132 LC_ALL=en_US.UTF-8 \
133 %py3_build %{?with_tests:test}
134 %endif
135
136 %if %{with apidocs}
137 #%{__make} -C docs html SPHINXBUILD=sphinx-build-3
138 # rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt"
139 sphinx-build-3 -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
140 %endif
141
142 %install
143 rm -rf $RPM_BUILD_ROOT
144
145 %if %{with python3}
146 %py3_install
147 %endif
148
149 %if %{with python2}
150 %py_install
151
152 # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
153 %py_postclean -x site-patch.py
154 %endif
155
156 %if %{with python3_default}
157 ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
158 %else
159 ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
160 %endif
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %if %{with python2}
166 %files
167 %defattr(644,root,root,755)
168 %doc CHANGES.rst README.rst
169 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
170 %{py_sitescriptdir}/pkg_resources
171 %{py_sitescriptdir}/setuptools
172 %{py_sitescriptdir}/easy_install.py[co]
173 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
174 %endif
175
176 %if %{with python3}
177 %files -n python3-%{module}
178 %defattr(644,root,root,755)
179 %doc CHANGES.rst README.rst
180 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
181 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
182 %{py3_sitescriptdir}/pkg_resources
183 %{py3_sitescriptdir}/setuptools
184 %{py3_sitescriptdir}/easy_install.py
185 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
186 %endif
187
188 %files -n easy_install
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/easy_install
191
192 %if %{with apidocs}
193 %files apidocs
194 %defattr(644,root,root,755)
195 %doc build/html/*
196 %endif
This page took 0.103089 seconds and 2 git commands to generate.