3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: A featureful, immutable, and correct URL for Python 2
9 Summary(pl.UTF-8): Funkcjonalne, niezmienne i poprawne URL-e dla Pythona 2
10 Name: python-hyperlink
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/hyperlink/
16 Source0: https://files.pythonhosted.org/packages/source/h/hyperlink/hyperlink-%{version}.tar.gz
17 # Source0-md5: 4772fb4d87c26a1ab22a6161424e3cba
18 URL: https://pypi.org/project/hyperlink/
20 BuildRequires: python-modules >= 1:2.6
21 BuildRequires: python-setuptools
23 BuildRequires: python-idna >= 2.5
24 BuildRequires: python-pytest >= 2.9.2
28 BuildRequires: python3-modules >= 1:3.4
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-idna >= 2.5
32 BuildRequires: python3-pytest >= 2.9.2
35 BuildRequires: rpm-pythonprov
36 BuildRequires: rpmbuild(macros) >= 1.714
38 BuildRequires: python3-sphinx_rtd_theme
39 BuildRequires: sphinx-pdg-3 >= 1.3
41 Requires: python-modules >= 1:2.6
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Hyperlink provides a pure-Python implementation of immutable URLs.
47 Based on RFC 3986 and 3987, the Hyperlink URL makes working with both
50 %description -l pl.UTF-8
51 Hyperlink zawiera czysto pythonową implementację niezmiennych URL-i.
52 Jest oparta na RFC 3986 i 3987, pozwala na łatwą pracę z URI oraz IRI.
54 %package -n python3-hyperlink
55 Summary: A featureful, immutable, and correct URL for Python 3
56 Summary(pl.UTF-8): Funkcjonalne, niezmienne i poprawne URL-e dla Pythona 3
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.4
60 %description -n python3-hyperlink
61 Hyperlink provides a pure-Python implementation of immutable URLs.
62 Based on RFC 3986 and 3987, the Hyperlink URL makes working with both
65 %description -n python3-hyperlink -l pl.UTF-8
66 Hyperlink zawiera czysto pythonową implementację niezmiennych URL-i.
67 Jest oparta na RFC 3986 i 3987, pozwala na łatwą pracę z URI oraz IRI.
70 Summary: API documentation for Python hyperlink module
71 Summary(pl.UTF-8): Dokumentacja API modułu Pythona hyperlink
75 API documentation for Python hyperlink module.
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API modułu Pythona hyperlink.
81 %setup -q -n hyperlink-%{version}
86 # deprecated target, but sometimes still used: %{?with_tests:test}
89 %{__python} -m pytest hyperlink/test
95 # deprecated target, but sometimes still used: %{?with_tests:test}
98 %{__python3} -m pytest hyperlink/test
103 %{__make} -C docs html \
104 SPHINXBUILD=sphinx-build-3
108 rm -rf $RPM_BUILD_ROOT
121 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
126 %doc CHANGELOG.md LICENSE README.md
127 %{py_sitescriptdir}/hyperlink
128 %{py_sitescriptdir}/hyperlink-%{version}-py*.egg-info
132 %files -n python3-hyperlink
133 %defattr(644,root,root,755)
134 %doc CHANGELOG.md LICENSE README.md
135 %{py3_sitescriptdir}/hyperlink
136 %{py3_sitescriptdir}/hyperlink-%{version}-py*.egg-info
141 %defattr(644,root,root,755)
142 %doc docs/_build/html/{_modules,_static,*.html,*.js}