2 # This is template for pure python modules (noarch)
3 # use template-specs/python-ext.spec for binary python packages
7 %bcond_with doc # don't build doc
9 %bcond_with tests # do not perform "make test"
10 %bcond_without python2 # CPython 2.x module
11 %bcond_without python3 # CPython 3.x module
14 # - 'module' should match the Python import path (first component?)
15 # - 'egg_name' should equal to Python egg name
16 # - 'pypi_name' must match the Python Package Index name
18 %define egg_name pbkdf2
19 %define pypi_name pbkdf2
20 Summary: Python implementation of password-based key derivation function, PBKDF2
21 # Summary(pl.UTF-8): -
22 Name: python-%{pypi_name}
26 Group: Libraries/Python
27 Source0: https://pypi.python.org/packages/02/c0/6a2376ae81beb82eda645a091684c0b0becb86b972def7849ea9066e3d5e/pbkdf2-%{version}.tar.gz
28 # Source0-md5: 40cda566f61420490206597243dd869f
29 URL: http://www.dlitz.net/software/python-pbkdf2/
30 #URL: https://pypi.python.org/pypi/MODULE
31 BuildRequires: rpm-pythonprov
32 BuildRequires: rpmbuild(macros) >= 1.714
34 BuildRequires: python-modules
35 BuildRequires: python-setuptools
38 BuildRequires: python3-modules
39 BuildRequires: python3-setuptools
41 # when using /usr/bin/env or other in-place substitutions
42 #BuildRequires: sed >= 4.0
43 # replace with other requires if defined in setup.py
44 Requires: python-modules
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Module which implements the password-based key derivation function,
50 PBKDF2, specified in RSA PKCS#5 v2.0.
52 # %description -l pl.UTF-8
54 %package -n python3-%{pypi_name}
57 Group: Libraries/Python
58 Requires: python3-modules
60 %description -n python3-%{pypi_name}
62 %description -n python3-%{pypi_name} -l pl.UTF-8
65 Summary: API documentation for Python %{module} module
66 Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
70 API documentation for Pythona %{module} module.
72 %description apidocs -l pl.UTF-8
73 Dokumentacja API modułu Pythona %{module}.
76 %setup -q -n %{pypi_name}-%{version}
80 %py_build %{?with_tests:test}
84 %py3_build %{?with_tests:test}
90 rm -rf _build/html/_sources
94 rm -rf $RPM_BUILD_ROOT
99 # when files are installed in other way that standard 'setup.py
100 # they need to be (re-)compiled
101 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
102 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
103 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
113 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
119 %{py_sitescriptdir}/%{module}.pyo
120 %{py_sitescriptdir}/%{module}.pyc
121 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
125 %files -n python3-%{pypi_name}
126 %defattr(644,root,root,755)
128 %{py3_sitescriptdir}/%{module}.py
129 %{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
130 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/*