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