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