]> git.pld-linux.org Git - packages/python3-jaraco.packaging.git/blob - python3-jaraco.packaging.spec
4c127dc4c1545932c372bad54819d155d22d039b
[packages/python3-jaraco.packaging.git] / python3-jaraco.packaging.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests (no tests in sources)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         egg_name        jaraco.packaging
9 %define         pypi_name       jaraco.packaging
10 Summary:        Tools to supplement packaging Python releases
11 Summary(pl.UTF-8):      Narzędzia wspierające pakietowanie wydań modułów Pythona
12 Name:           python3-%{pypi_name}
13 Version:        9.0.0
14 Release:        6
15 License:        MIT
16 Group:          Libraries/Python
17 #Source0Download: https://pypi.org/simple/jaraco-packaging/
18 Source0:        https://files.pythonhosted.org/packages/source/j/jaraco.packaging/%{pypi_name}-%{version}.tar.gz
19 Patch0:         no-pep517.patch
20 # Source0-md5:  a97dd749afaff6844f0843e153a9e49d
21 URL:            https://pypi.org/project/jaraco.packaging/
22 BuildRequires:  python3-modules >= 1:3.7
23 BuildRequires:  python3-setuptools >= 1:31.0.1
24 BuildRequires:  python3-setuptools_scm >= 3.4.1
25 BuildRequires:  python3-toml
26 %if %{with tests}
27 %if "%{py3_ver}" < "3.8"
28 BuildRequires:  python3-importlib_metadata
29 %endif
30 BuildRequires:  python3-jaraco.test
31 BuildRequires:  python3-pytest >= 6
32 BuildRequires:  python3-pytest-black >= 0.3.7
33 #BuildRequires: python3-pytest-checkdocs >= 2.4
34 BuildRequires:  python3-pytest-cov
35 #BuildRequires: python3-pytest-enabler >= 1.0.1
36 BuildRequires:  python3-pytest-flake8
37 BuildRequires:  python3-pytest-mypy >= 0.9.1
38 %endif
39 BuildRequires:  rpm-pythonprov
40 BuildRequires:  rpmbuild(macros) >= 1.714
41 %if %{with doc}
42 BuildRequires:  python3-rst.linker >= 1.9
43 BuildRequires:  sphinx-pdg-3
44 %endif
45 Requires:       python3-jaraco
46 Requires:       python3-modules >= 1:3.7
47 BuildArch:      noarch
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 A few tools to supplement packaging Python releases.
52
53 %description -l pl.UTF-8
54 Kilka narzędzi wspierających pakietowanie wydań modułów Pythona.
55
56 %package apidocs
57 Summary:        API documentation for Python jaraco.packaging module
58 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona jaraco.packaging
59 Group:          Documentation
60
61 %description apidocs
62 API documentation for Python jaraco.packaging module.
63
64 %description apidocs -l pl.UTF-8
65 Dokumentacja API modułu Pythona jaraco.packaging.
66
67 %prep
68 %setup -q -n %{pypi_name}-%{version}
69 %patch0 -p1
70
71 # stub for setuptools
72 cat >setup.py <<EOF
73 from setuptools import setup
74 setup()
75 EOF
76
77 %build
78 %py3_build
79
80 %if %{with tests}
81 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
82 %{__python3} -m pytest 
83 %endif
84
85 %if %{with doc}
86 # no Makefile
87 PYTHONPATH=$(pwd) \
88 sphinx-build-3 -b html docs docs/_build/html
89 %endif
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93
94 %py3_install
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %files
100 %defattr(644,root,root,755)
101 %doc CHANGES.rst LICENSE README.rst
102 %{py3_sitescriptdir}/jaraco/packaging
103 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
104
105 %if %{with doc}
106 %files apidocs
107 %defattr(644,root,root,755)
108 %doc docs/_build/html/{_static,*.html,*.js}
109 %endif
This page took 0.054899 seconds and 2 git commands to generate.