]> git.pld-linux.org Git - packages/python-rfc3986.git/blame - python-rfc3986.spec
rebuild with tests and docs
[packages/python-rfc3986.git] / python-rfc3986.spec
CommitLineData
6d2fca11
JK
1#
2# Conditional build:
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
7
8Summary: Validating URI References per RFC 3986
9Name: python-rfc3986
10Version: 1.1.0
be80881b 11Release: 7
6d2fca11
JK
12License: Apache
13Group: Libraries/Python
14Source0: https://files.pythonhosted.org/packages/source/r/rfc3986/rfc3986-%{version}.tar.gz
15# Source0-md5: fca89d6e949c31922ef82422ace66842
16URL: https://pypi.python.org/pypi/rfc3986
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-setuptools
24%endif
25Requires: python-modules
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30A Python implementation of RFC 3986 including validation and authority
31parsing.
32
33%package -n python3-rfc3986
34Summary: Validating URI References per RFC 3986
35Group: Libraries/Python
36Requires: python3-modules
37
38%description -n python3-rfc3986
39A Python implementation of RFC 3986 including validation and authority
40parsing.
41
42%package apidocs
43Summary: API documentation for Python rfc3986 module
44Summary(pl.UTF-8): Dokumentacja API modułu Pythona rfc3986
45Group: Documentation
46
47%description apidocs
48API documentation for Pythona rfc3986 module.
49
50%description apidocs -l pl.UTF-8
51Dokumentacja API modułu Pythona rfc3986.
52
53%prep
54%setup -q -n rfc3986-%{version}
55
56%build
57%if %{with python2}
58%py_build %{?with_tests:test}
59%endif
60
61%if %{with python3}
62%py3_build %{?with_tests:test}
63%endif
64
65%if %{with doc}
66cd docs
67%{__make} -j1 html
68rm -rf _build/html/_sources
69%endif
70
71%install
72rm -rf $RPM_BUILD_ROOT
73
74%if %{with python2}
75%py_install
76
77%py_postclean
78%endif
79
80%if %{with python3}
81%py3_install
82%endif
83
84%clean
85rm -rf $RPM_BUILD_ROOT
86
87%if %{with python2}
88%files
89%defattr(644,root,root,755)
90%doc AUTHORS.rst README.rst
91%{py_sitescriptdir}/rfc3986
92%{py_sitescriptdir}/rfc3986-%{version}-py*.egg-info
93%endif
94
95%if %{with python3}
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
101%endif
102
103%if %{with doc}
104%files apidocs
105%defattr(644,root,root,755)
106%doc docs/_build/html/*
107%endif
This page took 0.069912 seconds and 4 git commands to generate.