]> git.pld-linux.org Git - packages/python-jaraco.packaging.git/blob - python-jaraco.packaging.spec
rebuild with tests and docs
[packages/python-jaraco.packaging.git] / python-jaraco.packaging.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_with     python3 # CPython 3.x module (built from python3-jaraco.packaging.spec)
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:           python-%{pypi_name}
13 Version:        6.2
14 Release:        5
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 # Source0-md5:  ac36cfb217276af107bcbcb60bced1ec
20 URL:            https://pypi.org/project/jaraco.packaging/
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools >= 1:31.0.1
26 BuildRequires:  python-setuptools_scm >= 1.15
27 %if %{with tests}
28 BuildRequires:  python-importlib_metadata
29 BuildRequires:  python-pytest >= 3.5
30 BuildRequires:  python-six >= 1.4
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.2
35 BuildRequires:  python3-setuptools >= 1:31.0.1
36 BuildRequires:  python3-setuptools_scm >= 1.15
37 %if %{with tests}
38 %if "%{py3_ver}" < "3.8"
39 BuildRequires:  python3-importlib_metadata
40 %endif
41 BuildRequires:  python3-pytest >= 3.5
42 BuildRequires:  python3-six >= 1.4
43 %endif
44 %endif
45 %if %{with doc}
46 BuildRequires:  python-rst.linker >= 1.9
47 BuildRequires:  sphinx-pdg-2
48 %endif
49 Requires:       python-jaraco
50 Requires:       python-modules >= 1:2.7
51 BuildArch:      noarch
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 A few tools to supplement packaging Python releases.
56
57 %description -l pl.UTF-8
58 Kilka narzędzi wspierających pakietowanie wydań modułów Pythona.
59
60 %package -n python3-%{pypi_name}
61 Summary:        Tools to supplement packaging Python releases
62 Summary(pl.UTF-8):      Narzędzia wspierające pakietowanie wydań modułów Pythona
63 Group:          Libraries/Python
64 Requires:       python3-jaraco
65 Requires:       python3-modules >= 1:3.2
66
67 %description -n python3-%{pypi_name}
68 A few tools to supplement packaging Python releases.
69
70 %description -n python3-%{pypi_name} -l pl.UTF-8
71 Kilka narzędzi wspierających pakietowanie wydań modułów Pythona.
72
73 %package apidocs
74 Summary:        API documentation for Python jaraco.packaging module
75 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona jaraco.packaging
76 Group:          Documentation
77
78 %description apidocs
79 API documentation for Python jaraco.packaging module.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API modułu Pythona jaraco.packaging.
83
84 %prep
85 %setup -q -n %{pypi_name}-%{version}
86
87 %build
88 %if %{with python2}
89 %py_build %{?with_tests:test}
90 %endif
91
92 %if %{with python3}
93 %py3_build %{?with_tests:test}
94 %endif
95
96 %if %{with doc}
97 # no Makefile
98 cd docs
99 PYTHONPATH=$(pwd)/.. \
100 sphinx-build-2 -b html . _build/html
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %py_install
108
109 %py_postclean
110
111 # packaged in python-jaraco.spec
112 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/jaraco/__init__.py*
113
114 # packaged in python3 variant only
115 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{dependency-tree,upload-package}
116 %endif
117
118 %if %{with python3}
119 %py3_install
120
121 # packaged in python-jaraco.spec
122 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco/__init__.py
123 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco/__pycache__/__init__.*
124 %endif
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %if %{with python2}
130 %files
131 %defattr(644,root,root,755)
132 %doc CHANGES.rst LICENSE README.rst
133 %{py_sitescriptdir}/jaraco/packaging
134 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
135 %endif
136
137 %if %{with python3}
138 %files -n python3-%{pypi_name}
139 %defattr(644,root,root,755)
140 %doc CHANGES.rst LICENSE README.rst
141 %attr(755,root,root) %{_bindir}/dependency-tree
142 %attr(755,root,root) %{_bindir}/upload-package
143 %{py3_sitescriptdir}/jaraco/packaging
144 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
145 %endif
146
147 %if %{with doc}
148 %files apidocs
149 %defattr(644,root,root,755)
150 %doc docs/_build/html/{_static,*.html,*.js}
151 %endif
This page took 0.100152 seconds and 3 git commands to generate.