]> git.pld-linux.org Git - packages/python-rst.linker.git/blame - python-rst.linker.spec
rebuild with python 3.10
[packages/python-rst.linker.git] / python-rst.linker.spec
CommitLineData
1cd2da1a
JB
1#
2# Conditional build:
230ead43 3%bcond_without doc # documentation (uses python2, needs repository metadata)
4ae1ae20 4%bcond_without tests # py.test tests
1cd2da1a
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%if %{without python2}
9%undefine with_doc
10%endif
11Summary: rst.linker - Python 2 Sphinx plugin to add links to the changelog
12Summary(pl.UTF-8): rst.linker - wtyczka Sphinksa dla Pythona 2 do dodawania odnośników do changeloga
13Name: python-rst.linker
91c867bc 14Version: 1.11
0592513e 15Release: 3
1cd2da1a
JB
16License: MIT
17Group: Libraries/Python
6759b56c
JB
18#Source0Download: https://pypi.org/simple/rst.linker/
19Source0: https://files.pythonhosted.org/packages/source/r/rst.linker/rst.linker-%{version}.tar.gz
91c867bc
JB
20# Source0-md5: 9541a7debee1c5b4ac54350696082664
21URL: https://github.com/jaraco/rst.linker
1cd2da1a
JB
22%if %{with python2}
23BuildRequires: python-devel >= 1:2.7
230ead43 24BuildRequires: python-modules >= 1:2.7
91c867bc 25BuildRequires: python-setuptools >= 1:31.0.1
4ae1ae20
JB
26BuildRequires: python-setuptools_scm >= 1.15.0
27%if %{with tests}
28BuildRequires: python-dateutil
91c867bc 29BuildRequires: python-importlib_metadata
4ae1ae20 30BuildRequires: python-path
91c867bc
JB
31BuildRequires: python-pytest >= 3.5
32BuildRequires: python-pytest-black-multipy
6759b56c 33BuildRequires: python-pytest-flake8
230ead43 34BuildRequires: python-six
4ae1ae20 35%endif
6759b56c
JB
36%if %{with doc}
37BuildRequires: python-Sphinx
38BuildRequires: python-jaraco.packaging >= 3.2
39# needs to be already installed
40BuildRequires: python-rst.linker >= 1.9
41%endif
1cd2da1a
JB
42%endif
43%if %{with python3}
44BuildRequires: python3-devel >= 1:3.2
230ead43 45BuildRequires: python3-modules >= 1:3.2
91c867bc 46BuildRequires: python3-setuptools >= 1:31.0.1
4ae1ae20
JB
47BuildRequires: python3-setuptools_scm >= 1.15.0
48%if %{with tests}
49BuildRequires: python3-dateutil
91c867bc
JB
50%if "%{py3_ver}" < "3.8"
51BuildRequires: python3-importlib_metadata
52%endif
4ae1ae20 53BuildRequires: python3-path
91c867bc
JB
54BuildRequires: python3-pytest >= 3.5
55BuildRequires: python3-pytest-black-multipy
6759b56c 56BuildRequires: python3-pytest-flake8
230ead43 57BuildRequires: python3-six
1cd2da1a 58%endif
4ae1ae20
JB
59%endif
60BuildRequires: rpm-pythonprov
61BuildRequires: rpmbuild(macros) >= 1.714
1cd2da1a 62Requires: python-Sphinx
1cd2da1a
JB
63BuildArch: noarch
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%description
67rst.linker is a Sphinx plugin to add links to the changelog.
68
69%description -l pl.UTF-8
70rst.linker to wtyczka Sphinksa służąca do dodawania odnośników do
71changeloga.
72
73%package -n python3-rst.linker
74Summary: rst.linker - Python 3 Sphinx plugin to add links to the changelog
75Summary(pl.UTF-8): rst.linker - wtyczka Sphinksa dla Pythona 3 do dodawania odnośników do changeloga
76Group: Libraries/Python
77Requires: python3-Sphinx
1cd2da1a
JB
78
79%description -n python3-rst.linker
80rst.linker is a Sphinx plugin to add links to the changelog.
81
82%description -n python3-rst.linker -l pl.UTF-8
83rst.linker to wtyczka Sphinksa służąca do dodawania odnośników do
84changeloga.
85
86%package apidocs
87Summary: Documentation for rst.linker module
88Summary(pl.UTF-8): Dokumentacja do modułu rst.linker
89Group: Documentation
90
91%description apidocs
92Documentation for rst.linker module.
93
94%description apidocs -l pl.UTF-8
95Dokumentacja do modułu rst.linker.
96
97%prep
98%setup -q -n rst.linker-%{version}
99
100%build
101%if %{with python2}
6759b56c 102%py_build %{?with_doc:build_sphinx}
1cd2da1a 103
91c867bc
JB
104%if %{with tests}
105PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
106PYTEST_PLUGINS="pytest_black_multipy,pytest_flake8" \
107%{__python} -m pytest test_all.py
108%endif
1cd2da1a
JB
109%endif
110
111%if %{with python3}
6759b56c 112%py3_build
4ae1ae20 113
91c867bc
JB
114%if %{with tests}
115PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
116PYTEST_PLUGINS="pytest_black,pytest_black_multipy,pytest_flake8" \
117%{__python3} -m pytest test_all.py
118%endif
1cd2da1a
JB
119%endif
120
121%install
122rm -rf $RPM_BUILD_ROOT
123
124%if %{with python2}
5e7b6244 125%py_install
1cd2da1a
JB
126
127%py_postclean
128%endif
129
130%if %{with python3}
5e7b6244 131%py3_install
1cd2da1a
JB
132%endif
133
134%clean
135rm -rf $RPM_BUILD_ROOT
136
137%if %{with python2}
138%files
139%defattr(644,root,root,755)
6759b56c 140%doc CHANGES.rst LICENSE README.rst
1cd2da1a 141%dir %{py_sitescriptdir}/rst
91c867bc
JB
142%{py_sitescriptdir}/rst/__init__.py[co]
143%{py_sitescriptdir}/rst/linker.py[co]
1cd2da1a
JB
144%{py_sitescriptdir}/rst.linker-%{version}-py*.egg-info
145%endif
146
147%if %{with python3}
148%files -n python3-rst.linker
149%defattr(644,root,root,755)
6759b56c 150%doc CHANGES.rst LICENSE README.rst
1cd2da1a 151%dir %{py3_sitescriptdir}/rst
91c867bc
JB
152%{py3_sitescriptdir}/rst/__init__.py
153%{py3_sitescriptdir}/rst/linker.py
1cd2da1a 154%dir %{py3_sitescriptdir}/rst/__pycache__
91c867bc
JB
155%{py3_sitescriptdir}/rst/__pycache__/__init__.cpython-*.py[co]
156%{py3_sitescriptdir}/rst/__pycache__/linker.cpython-*.py[co]
1cd2da1a
JB
157%{py3_sitescriptdir}/rst.linker-%{version}-py*.egg-info
158%endif
159
160%if %{with doc}
161%files apidocs
162%defattr(644,root,root,755)
6759b56c 163%doc build-2/sphinx/html/{_static,*.html,*.js}
1cd2da1a 164%endif
This page took 0.117255 seconds and 4 git commands to generate.