]> git.pld-linux.org Git - packages/python-rfc3986.git/blob - python-rfc3986.spec
rebuild with python 3.10
[packages/python-rfc3986.git] / python-rfc3986.spec
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
8 Summary:        Validating URI References per RFC 3986
9 Name:           python-rfc3986
10 Version:        1.1.0
11 Release:        5
12 License:        Apache
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
19 %if %{with python2}
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-setuptools
24 %endif
25 Requires:       python-modules
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 A Python implementation of RFC 3986 including validation and authority
31 parsing.
32
33 %package -n python3-rfc3986
34 Summary:        Validating URI References per RFC 3986
35 Group:          Libraries/Python
36 Requires:       python3-modules
37
38 %description -n python3-rfc3986
39 A Python implementation of RFC 3986 including validation and authority
40 parsing.
41
42 %package apidocs
43 Summary:        API documentation for Python rfc3986 module
44 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona rfc3986
45 Group:          Documentation
46
47 %description apidocs
48 API documentation for Pythona rfc3986 module.
49
50 %description apidocs -l pl.UTF-8
51 Dokumentacja 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}
66 cd docs
67 %{__make} -j1 html
68 rm -rf _build/html/_sources
69 %endif
70
71 %install
72 rm -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
85 rm -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.075605 seconds and 3 git commands to generate.