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