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