]> git.pld-linux.org Git - packages/python-shortuuid.git/blob - python-shortuuid.spec
rebuild with tests and docs
[packages/python-shortuuid.git] / python-shortuuid.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  shortuuid
8 Summary:        Generator library for concise, unambiguous and URL-safe UUIDs
9 Summary(pl.UTF-8):      Biblioteka generacji jednoznacznych UUIDów dla URLi
10 Name:           python-%{module}
11 Version:        0.4.3
12 Release:        7
13 License:        BSD
14 Group:          Libraries/Python
15 Source0:        https://pypi.python.org/packages/e9/41/d867be1470af87dd8af1b3462e5eae44f78ffd33cec54630d40ca6b2d0bd/shortuuid-%{version}.tar.gz
16 # Source0-md5:  4f70db8174c0b7b8cad36de48b529947
17 URL:            https://github.com/stochastic-technologies/shortuuid/
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python-modules
22 BuildRequires:  python-pep8
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-pep8
28 BuildRequires:  python3-setuptools
29 %endif
30 Requires:       python-modules
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Library that generates short, pretty, unambiguous unique IDs by using
36 an extensive, case-sensitive alphabet and omitting similar-looking
37 letters and numbers.
38
39 %description -l pl.UTF-8
40 Biblioteka która generuje krótkie, ładne, jednoznaczne i unikalne IDy
41 używając obszernego, uwzlgedniającego wielkość liter alfabetu i
42 omijając podbone znaki i liczby.
43
44 %package -n python3-%{module}
45 Summary:        Generator library for concise, unambiguous and URL-safe UUIDs
46 Summary(pl.UTF-8):      Biblioteka generacji jednoznacznych UUIDów dla URLi
47 Group:          Libraries/Python
48 Requires:       python3-modules
49
50 %description -n python3-%{module}
51 Library that generates short, pretty, unambiguous unique IDs by using
52 an extensive, case-sensitive alphabet and omitting similar-looking
53 letters and numbers.
54
55 %description -n python3-%{module} -l pl.UTF-8
56 Biblioteka która generuje krótkie, ładne, jednoznaczne i unikalne IDy
57 używając obszernego, uwzlgedniającego wielkość liter alfabetu i
58 omijając podbone znaki i liczby.
59
60 %package apidocs
61 Summary:        %{module} API documentation
62 Summary(pl.UTF-8):      Dokumentacja API %{module}
63 Group:          Documentation
64
65 %description apidocs
66 API documentation for %{module}.
67
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API %{module}.
70
71 %prep
72 %setup -q -n %{module}-%{version}
73
74 %build
75 %if %{with python2}
76 %py_build %{?with_tests:test}
77 %endif
78
79 %if %{with python3}
80 %py3_build %{?with_tests:test}
81 %endif
82
83 %if %{with doc}
84 cd docs
85 %{__make} -j1 html
86 rm -rf _build/html/_sources
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %py_install
94
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %py3_install
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc README.rst
109 %{py_sitescriptdir}/%{module}
110 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
111 %endif
112
113 %if %{with python3}
114 %files -n python3-%{module}
115 %defattr(644,root,root,755)
116 %doc README.rst
117 %{py3_sitescriptdir}/%{module}
118 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
119 %endif
120
121 %if %{with doc}
122 %files apidocs
123 %defattr(644,root,root,755)
124 %doc docs/_build/html/*
125 %endif
This page took 0.08981 seconds and 3 git commands to generate.