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