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