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