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