]> git.pld-linux.org Git - packages/python-jaraco.packaging.git/blame - python-jaraco.packaging.spec
disable python3 here
[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
39fc7e11 6%bcond_with python3 # CPython 3.x module
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
e5842683 14Release: 4
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
JB
45%if %{with doc}
46BuildRequires: python3-rst.linker >= 1.9
47BuildRequires: sphinx-pdg-3
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)/.. \
100sphinx-build-3 -b html . _build/html
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*
e105cc2d
AM
113%endif
114
115%if %{with python3}
116%py3_install
c1c0cff9
JB
117
118# packaged in python-jaraco.spec
119%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco/__init__.py
120%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco/__pycache__/__init__.*
e105cc2d
AM
121%endif
122
123%clean
124rm -rf $RPM_BUILD_ROOT
125
126%if %{with python2}
127%files
128%defattr(644,root,root,755)
d5c345cb
JB
129%doc CHANGES.rst LICENSE README.rst
130%{py_sitescriptdir}/jaraco/packaging
e105cc2d 131%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
e105cc2d
AM
132%endif
133
134%if %{with python3}
135%files -n python3-%{pypi_name}
136%defattr(644,root,root,755)
d5c345cb 137%doc CHANGES.rst LICENSE README.rst
e105cc2d
AM
138%attr(755,root,root) %{_bindir}/dependency-tree
139%attr(755,root,root) %{_bindir}/upload-package
d5c345cb 140%{py3_sitescriptdir}/jaraco/packaging
e105cc2d 141%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
e105cc2d 142%endif
60ffabb3
JB
143
144%if %{with doc}
145%files apidocs
146%defattr(644,root,root,755)
147%doc docs/_build/html/{_static,*.html,*.js}
148%endif
This page took 0.190646 seconds and 4 git commands to generate.