3 %bcond_with doc # do build doc (broken)
4 %bcond_with tests # do perform "make test" (broken)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Validating URI References per RFC 3986
13 Group: Libraries/Python
14 Source0: https://files.pythonhosted.org/packages/source/r/rfc3986/rfc3986-%{version}.tar.gz
15 # Source0-md5: fca89d6e949c31922ef82422ace66842
16 URL: https://pypi.python.org/pypi/rfc3986
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-setuptools
23 BuildRequires: python3-setuptools
25 Requires: python-modules
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 A Python implementation of RFC 3986 including validation and authority
33 %package -n python3-rfc3986
34 Summary: Validating URI References per RFC 3986
35 Group: Libraries/Python
36 Requires: python3-modules
38 %description -n python3-rfc3986
39 A Python implementation of RFC 3986 including validation and authority
43 Summary: API documentation for Python rfc3986 module
44 Summary(pl.UTF-8): Dokumentacja API modułu Pythona rfc3986
48 API documentation for Pythona rfc3986 module.
50 %description apidocs -l pl.UTF-8
51 Dokumentacja API modułu Pythona rfc3986.
54 %setup -q -n rfc3986-%{version}
58 %py_build %{?with_tests:test}
62 %py3_build %{?with_tests:test}
68 rm -rf _build/html/_sources
72 rm -rf $RPM_BUILD_ROOT
85 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %doc AUTHORS.rst README.rst
91 %{py_sitescriptdir}/rfc3986
92 %{py_sitescriptdir}/rfc3986-%{version}-py*.egg-info
96 %files -n python3-rfc3986
97 %defattr(644,root,root,755)
98 %doc AUTHORS.rst README.rst
99 %{py3_sitescriptdir}/rfc3986
100 %{py3_sitescriptdir}/rfc3986-%{version}-py*.egg-info
105 %defattr(644,root,root,755)
106 %doc docs/_build/html/*