]> git.pld-linux.org Git - packages/python3-setuptools.git/blob - python3-setuptools.spec
ad802ec0d5a23a1b3e5114a8f167c0ceb4f063ae
[packages/python3-setuptools.git] / python3-setuptools.spec
1 #
2 # Conditional build:
3 %bcond_with     apidocs         # Sphinx based documentation
4 %bcond_with     system_libs     # use system modules (appdirs, packaging, pyparsing) # TODO
5 %bcond_with     tests           # py.test tests (few failures)
6 %bcond_with     bootstrap       # convenience alias for without: apidocs,system_libs,tests
7
8 %if %{with bootstrap}
9 %undefine       with_apidocs
10 %undefine       with_system_libs
11 %undefine       with_tests
12 %endif
13
14 %define         module          setuptools
15 %define         pypi_name       setuptools
16 Summary:        A collection of enhancements to the Python distutils
17 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
18 Name:           python3-setuptools
19 Version:        62.0.0
20 Release:        0.2
21 Epoch:          1
22 License:        MIT
23 Group:          Development/Languages/Python
24 #Source0Download: https://pypi.org/simple/setuptools/
25 Source0:        https://github.com/pypa/setuptools/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
26 # Source0-md5:  7f932b83c8c74751a2f1e60cd569189b
27 Patch0:         setuptools-missing.patch
28 URL:            https://github.com/pypa/setuptools
29 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
30 BuildRequires:  glibc-localedb-all
31 %endif
32 BuildRequires:  python3-modules >= 1:3.6
33 %if %{with system_libs}
34 # versions from pkg_resources/_vendor/vendored.txt
35 BuildRequires:  python3-appdirs >= 1.4.3
36 BuildRequires:  python3-packaging >= 20.4
37 BuildRequires:  python3-pyparsing >= 2.2.1
38 %endif
39 BuildConflicts: python3-distribute < 0.7
40 %if %{with tests}
41 BuildRequires:  python3-Sphinx
42 BuildRequires:  python3-coverage >= 4.5.1
43 BuildRequires:  python3-flake8-2020
44 BuildRequires:  python3-jaraco.envs
45 BuildRequires:  python3-jaraco.path >= 3.2.0
46 # FIXME: patch to use unittest.mock
47 #BuildRequires: python3-mock
48 BuildRequires:  python3-paver
49 BuildRequires:  python3-pip >= 19.1
50 BuildRequires:  python3-pytest >= 4.6
51 BuildRequires:  python3-pytest-black >= 0.3.7
52 BuildRequires:  python3-pytest-checkdocs >= 2.4
53 BuildRequires:  python3-pytest-cov >= 2.5.1
54 BuildRequires:  python3-pytest-enabler >= 1.0.1
55 BuildRequires:  python3-pytest-flake8
56 BuildRequires:  python3-pytest-mypy
57 BuildRequires:  python3-pytest-virtualenv >= 1.2.7
58 BuildRequires:  python3-pytest-xdist
59 BuildRequires:  python3-virtualenv >= 13.0.0
60 BuildRequires:  python3-wheel
61 %endif
62 %if %{with apidocs}
63 BuildRequires:  python3-Sphinx
64 BuildRequires:  python3-furo
65 BuildRequires:  python3-jaraco
66 BuildRequires:  python3-jaraco.packaging >= 8.2
67 BuildRequires:  python3-jaraco.tidelift
68 BuildRequires:  python3-rst.linker >= 1.9
69 # specified but not required(?)
70 #BuildRequires: python3-pygments-github-lexers >= 0.0.5
71 BuildRequires:  python3-setuptools >= 1:34
72 BuildRequires:  python3-sphinx_favicon
73 BuildRequires:  python3-sphinx_inline_tabs
74 BuildRequires:  python3-sphinxcontrib-towncrier
75 BuildRequires:  python3-toml
76 BuildRequires:  python3-wheel
77 %endif
78 %{!?with_bootstrap:BuildRequires:       rpm-pythonprov}
79 BuildRequires:  rpmbuild(macros) >= 1.714
80 BuildRequires:  unzip
81 BuildConflicts: python3-setuptools_scm
82 Requires:       python3-modules >= 1:3.6
83 %if %{with system_libs}
84 # versions from pkg_resources/_vendor/vendored.txt
85 Requires:       python3-appdirs >= 1.4.3
86 Requires:       python3-packaging >= 20.4
87 Requires:       python3-pyparsing >= 2.2.1
88 %endif
89 BuildArch:      noarch
90 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91
92 %description
93 setuptools is a collection of enhancements to the Python distutils
94 that allow you to more easily build and distribute Python 2.x
95 packages, especially ones that have dependencies on other packages.
96
97 %description -l pl.UTF-8
98 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
99 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
100 szczególnie tych mających zależności od innych pakietów.
101
102 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
103 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
104 Pythona 2.x.
105
106 %package apidocs
107 Summary:        %{module} API documentation
108 Summary(pl.UTF-8):      Dokumentacja API %{module}
109 Group:          Documentation
110
111 %description apidocs
112 API documentation for %{module}.
113
114 %description apidocs -l pl.UTF-8
115 Dokumentacja API %{module}.
116
117 %prep
118 %setup -q -n %{module}-%{version}
119 %patch0 -p1
120
121 %if %{with system_libs}
122 exit 1 # TODO: unvendor modules from pkg_resources/_vendor
123 %endif
124
125 %build
126 LC_ALL=C.UTF-8 \
127 %py3_build
128
129 %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
130
131 %if %{with apidocs}
132 cd docs
133 %{__python3} -m sphinx -W . build/html
134 %endif
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138
139 %py3_install
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %files
145 %defattr(644,root,root,755)
146 %doc CHANGES.rst LICENSE README.rst
147 %{py3_sitescriptdir}/_distutils_hack
148 %{py3_sitescriptdir}/distutils-precedence.pth
149 %{py3_sitescriptdir}/pkg_resources
150 %{py3_sitescriptdir}/setuptools
151 %{py3_sitescriptdir}/%{module}-%{version}*py*.egg-info
152
153 %if %{with apidocs}
154 %files apidocs
155 %defattr(644,root,root,755)
156 %doc docs/build/html/{_static,deprecated,development,references,userguide,*.html,*.js}
157 %endif
This page took 0.04053 seconds and 3 git commands to generate.