]> git.pld-linux.org Git - packages/python-pbkdf2.git/blame - python-pbkdf2.spec
rebuild with python 3.10
[packages/python-pbkdf2.git] / python-pbkdf2.spec
CommitLineData
160d84ec
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# Fails on aetypes
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
12
13# NOTES:
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
17%define module pbkdf2
18%define egg_name pbkdf2
19%define pypi_name pbkdf2
20Summary: Python implementation of password-based key derivation function, PBKDF2
21# Summary(pl.UTF-8): -
22Name: python-%{pypi_name}
23Version: 1.3
e2a9605b 24Release: 6
160d84ec
MK
25License: MIT
26Group: Libraries/Python
27Source0: https://pypi.python.org/packages/02/c0/6a2376ae81beb82eda645a091684c0b0becb86b972def7849ea9066e3d5e/pbkdf2-%{version}.tar.gz
28# Source0-md5: 40cda566f61420490206597243dd869f
29URL: http://www.dlitz.net/software/python-pbkdf2/
30#URL: https://pypi.python.org/pypi/MODULE
31BuildRequires: rpm-pythonprov
32BuildRequires: rpmbuild(macros) >= 1.714
33%if %{with python2}
34BuildRequires: python-modules
35BuildRequires: python-setuptools
36%endif
37%if %{with python3}
38BuildRequires: python3-modules
39BuildRequires: python3-setuptools
40%endif
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
44Requires: python-modules
45BuildArch: noarch
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49Module which implements the password-based key derivation function,
50PBKDF2, specified in RSA PKCS#5 v2.0.
51
52# %description -l pl.UTF-8
53
54%package -n python3-%{pypi_name}
55Summary: -
56Summary(pl.UTF-8): -
57Group: Libraries/Python
58Requires: python3-modules
59
60%description -n python3-%{pypi_name}
61
62%description -n python3-%{pypi_name} -l pl.UTF-8
63
64%package apidocs
65Summary: API documentation for Python %{module} module
66Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
67Group: Documentation
68
69%description apidocs
70API documentation for Pythona %{module} module.
71
72%description apidocs -l pl.UTF-8
73Dokumentacja API modułu Pythona %{module}.
74
75%prep
76%setup -q -n %{pypi_name}-%{version}
77
78%build
79%if %{with python2}
80%py_build %{?with_tests:test}
81%endif
82
83%if %{with python3}
84%py3_build %{?with_tests:test}
85%endif
86
87%if %{with doc}
88cd docs
89%{__make} -j1 html
90rm -rf _build/html/_sources
91%endif
92
93%install
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%py_install
98
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}
104
105%py_postclean
106%endif
107
108%if %{with python3}
109%py3_install
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%files
117%defattr(644,root,root,755)
118%doc README.txt
119%{py_sitescriptdir}/%{module}.pyo
120%{py_sitescriptdir}/%{module}.pyc
121%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
122%endif
123
124%if %{with python3}
125%files -n python3-%{pypi_name}
126%defattr(644,root,root,755)
127%doc README.txt
128%{py3_sitescriptdir}/%{module}.py
129%{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
130%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
131%endif
132
133%if %{with doc}
134%files apidocs
135%defattr(644,root,root,755)
136%doc docs/_build/html/*
137%endif
This page took 0.303365 seconds and 4 git commands to generate.