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: 4d8ab82e5e0c86b15f4ba5aff2bec6b5
18 URL: https://github.com/dstufft/bcrypt/
19 BuildRequires: rpm-pythonprov
20 # if py_postclean is used
21 BuildRequires: rpmbuild(macros) >= 1.710
23 BuildRequires: python-cffi
24 BuildRequires: python-d2to1
25 BuildRequires: python-devel
26 BuildRequires: python-distribute
27 BuildRequires: python-modules
28 BuildRequires: python-py
29 BuildRequires: python-pytest
30 BuildRequires: python-six
33 BuildRequires: python3-cffi
34 BuildRequires: python3-devel
35 BuildRequires: python3-devel-tools
36 BuildRequires: python3-distribute
37 BuildRequires: python3-modules
38 BuildRequires: python3-py
39 BuildRequires: python3-pytest
40 BuildRequires: python3-six
42 Requires: python-cffi > 0.8
43 Requires: python-modules
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 This library should be compatible with py-bcrypt and it will run on
48 Python 2.6, 2.7, 3.2, 3.3 and PyPy 2.0
50 %description -l pl.UTF-8
51 Biblioteka powinna byc kompatybilna z biblioteką py-bcrypt, działa dla
52 Python 2.6, 2.7, 3.2, 3.3 and PyPy 2.0
54 %package -n python3-%{module}
55 Summary: Library for password hashing for your software and your servers
56 Summary(pl.UTF-8): Biblioteka do tworzenia skrótów haseł dla twojego oprogramowania i serwerów
57 Group: Libraries/Python
58 Requires: python3-cffi > 0.8
59 Requires: python3-modules
61 %description -n python3-%{module}
62 This library should be compatible with py-bcrypt and it will run on
63 Python 2.6-3.4 and PyPy 2.0
65 %description -n python3-%{module} -l pl.UTF-8
66 Biblioteka powinna byc kompatybilna z biblioteką py-bcrypt, działa dla
67 Python 2.6-3.4 and PyPy 2.0
70 Summary: %{module} API documentation
71 Summary(pl.UTF-8): Dokumentacja API %{module}
75 API documentation for %{module}.
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API %{module}.
81 %setup -q -n %{module}-%{version}
86 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
87 %py_build %{?with_tests:test}
92 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
93 %py3_build %{?with_tests:test}
99 rm -rf _build/html/_sources
103 rm -rf $RPM_BUILD_ROOT
118 rm -rf $RPM_BUILD_ROOT
122 %defattr(644,root,root,755)
124 %dir %{py_sitedir}/%{module}
125 %attr(755,root,root) %{py_sitedir}/bcrypt/*.so
126 %{py_sitedir}/%{module}/*.py[co]
127 %if "%{py_ver}" > "2.4"
128 %{py_sitedir}/%{module}-%{version}-py*.egg-info
133 %files -n python3-%{module}
134 %defattr(644,root,root,755)
136 %dir %{py3_sitedir}/%{module}
137 %attr(755,root,root) %{py3_sitedir}/bcrypt/*.so
138 %{py3_sitedir}/%{module}/*.py
139 %dir %{py3_sitedir}/%{module}/__pycache__
140 %{py3_sitedir}/%{module}/__pycache__/*.py[co]
141 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
146 %defattr(644,root,root,755)
147 %doc docs/_build/html/*