]> git.pld-linux.org Git - packages/python-purl.git/blob - python-purl.spec
rebuild with tests and docs
[packages/python-purl.git] / python-purl.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (not included in dist)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Simple Python URL class
8 Summary(pl.UTF-8):      Prosta klasa URL dla Pythona
9 Name:           python-purl
10 Version:        1.5
11 Release:        6
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/purl/
15 Source0:        https://files.pythonhosted.org/packages/source/p/purl/purl-%{version}.tar.gz
16 # Source0-md5:  2a10782a6f0c771f3f3319956d41f7ff
17 URL:            https://pypi.org/project/purl/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.6
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-six
23 %endif
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.3
27 BuildRequires:  python3-setuptools
28 %if %{with tests}
29 BuildRequires:  python3-six
30 %endif
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 Requires:       python-modules >= 1:2.6
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 A simple, immutable URL class with a clean API for interrogation and
40 manipulation.
41
42 %description -l pl.UTF-8
43 Prosta, niezmienna klasa URL z czystym API do zapytań i operacji.
44
45 %package -n python3-purl
46 Summary:        Simple Python URL class
47 Summary(pl.UTF-8):      Prosta klasa URL dla Pythona
48 Group:          Libraries/Python
49 Requires:       python3-modules >= 1:3.3
50
51 %description -n python3-purl
52 A simple, immutable URL class with a clean API for interrogation and
53 manipulation.
54
55 %description -n python3-purl -l pl.UTF-8
56 Prosta, niezmienna klasa URL z czystym API do zapytań i operacji.
57
58 %prep
59 %setup -q -n purl-%{version}
60
61 %build
62 %if %{with python2}
63 %py_build
64
65 %if %{with tests}
66 %{__python} -m pytest tests
67 %endif
68 %endif
69
70 %if %{with python3}
71 %py3_build
72
73 %if %{with tests}
74 %{__python3} -m pytest tests
75 %endif
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %if %{with python2}
82 %py_install
83
84 %py_postclean
85 %endif
86
87 %if %{with python3}
88 %py3_install
89 %endif
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %files
96 %defattr(644,root,root,755)
97 %doc LICENSE README.rst
98 %{py_sitescriptdir}/purl
99 %{py_sitescriptdir}/purl-%{version}-py*.egg-info
100 %endif
101
102 %if %{with python3}
103 %files -n python3-purl
104 %defattr(644,root,root,755)
105 %doc LICENSE README.rst
106 %{py3_sitescriptdir}/purl
107 %{py3_sitescriptdir}/purl-%{version}-py*.egg-info
108 %endif
This page took 0.510943 seconds and 3 git commands to generate.