]> git.pld-linux.org Git - packages/python3-setuptools.git/blob - python-setuptools.spec
add missing -l pl.UTF-8 for easy_install
[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.3.1
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/source/s/setuptools/setuptools-%{version}.tar.gz
24 # Source0-md5:  7e4ba5cdebc02710d3ab748c103fc673
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 -l pl.UTF-8
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 # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
151 %py_postclean -x site-patch.py
152 %endif
153
154 %if %{with python3_default}
155 ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
156 %else
157 ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
158 %endif
159
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %if %{with python2}
164 %files
165 %defattr(644,root,root,755)
166 %doc CHANGES.txt README.txt
167 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
168 %{py_sitescriptdir}/pkg_resources
169 %{py_sitescriptdir}/setuptools
170 %{py_sitescriptdir}/easy_install.py[co]
171 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
172 %endif
173
174 %if %{with python3}
175 %files -n python3-%{module}
176 %defattr(644,root,root,755)
177 %doc CHANGES.txt README.txt
178 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
179 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
180 %{py3_sitescriptdir}/pkg_resources
181 %{py3_sitescriptdir}/setuptools
182 %{py3_sitescriptdir}/easy_install.py
183 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
184 %endif
185
186 %files -n easy_install
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_bindir}/easy_install
189
190 %if %{with apidocs}
191 %files apidocs
192 %defattr(644,root,root,755)
193 %doc build/html/*
194 %endif
This page took 0.097722 seconds and 3 git commands to generate.