3 %bcond_with doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: Library for password hashing for your software and your servers
10 Summary(pl.UTF-8): Biblioteka do tworzenia skrótów haseł dla twojego oprogramowania i serwerów
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: https://pypi.debian.net/bcrypt/%{module}-%{version}.tar.gz
17 # Source0-md5: 43c5871c6bc7da1efe6a8bae25f90ad8
19 URL: https://github.com/dstufft/bcrypt/
20 BuildRequires: rpm-pythonprov
21 # if py_postclean is used
22 BuildRequires: rpmbuild(macros) >= 1.710
24 BuildRequires: python-cffi
25 BuildRequires: python-d2to1
26 BuildRequires: python-devel
27 BuildRequires: python-distribute
28 BuildRequires: python-modules
29 BuildRequires: python-py
30 BuildRequires: python-pytest
31 BuildRequires: python-six
34 BuildRequires: python3-cffi
35 BuildRequires: python3-devel
36 BuildRequires: python3-devel-tools
37 BuildRequires: python3-distribute
38 BuildRequires: python3-modules
39 BuildRequires: python3-py
40 BuildRequires: python3-pytest
41 BuildRequires: python3-six
43 Requires: python-cffi > 0.8
44 Requires: python-modules
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 This library should be compatible with py-bcrypt and it will run on
49 Python 2.6, 2.7, 3.2, 3.3 and PyPy 2.0
51 %description -l pl.UTF-8
52 Biblioteka powinna byc kompatybilna z biblioteką py-bcrypt, działa dla
53 Python 2.6, 2.7, 3.2, 3.3 and PyPy 2.0
55 %package -n python3-%{module}
56 Summary: Library for password hashing for your software and your servers
57 Summary(pl.UTF-8): Biblioteka do tworzenia skrótów haseł dla twojego oprogramowania i serwerów
58 Group: Libraries/Python
59 Requires: python3-cffi > 0.8
60 Requires: python3-modules
62 %description -n python3-%{module}
63 This library should be compatible with py-bcrypt and it will run on
64 Python 2.6-3.4 and PyPy 2.0
66 %description -n python3-%{module} -l pl.UTF-8
67 Biblioteka powinna byc kompatybilna z biblioteką py-bcrypt, działa dla
68 Python 2.6-3.4 and PyPy 2.0
71 Summary: %{module} API documentation
72 Summary(pl.UTF-8): Dokumentacja API %{module}
76 API documentation for %{module}.
78 %description apidocs -l pl.UTF-8
79 Dokumentacja API %{module}.
82 %setup -q -n %{module}-%{version}
88 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
89 %py_build %{?with_tests:test}
94 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
95 %py3_build %{?with_tests:test}
101 rm -rf _build/html/_sources
105 rm -rf $RPM_BUILD_ROOT
110 # Deleting crypt_blowfish-1.3 source files installed
111 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/crypt_blowfish-1.3
119 # Deleting crypt_blowfish-1.3 source files installed
120 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/crypt_blowfish-1.3
124 rm -rf $RPM_BUILD_ROOT
128 %defattr(644,root,root,755)
130 %dir %{py_sitedir}/%{module}
131 %{py_sitedir}/%{module}/*.py[co]
132 %attr(755,root,root) %{py_sitedir}/*.so
133 %if "%{py_ver}" > "2.4"
134 %{py_sitedir}/%{module}-%{version}-py*.egg-info
139 %files -n python3-%{module}
140 %defattr(644,root,root,755)
142 %attr(755,root,root) %{py3_sitedir}/*.so
143 %{py3_sitedir}/%{module}
144 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
149 %defattr(644,root,root,755)
150 %doc docs/_build/html/*