3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: Library for password hashing for your software and your servers
9 Summary(pl.UTF-8): Biblioteka do tworzenia skrótów haseł dla programów i serwerów
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/bcrypt/
16 Source0: https://files.pythonhosted.org/packages/source/b/bcrypt/%{module}-%{version}.tar.gz
17 # Source0-md5: 5d6f93b575ce52470af37a8e7dce76fe
18 URL: https://github.com/dstufft/bcrypt/
20 BuildRequires: python-cffi >= 1.1
21 BuildRequires: python-devel >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-pytest >= 3.2.1
25 BuildRequires: python-six >= 1.4.1
29 BuildRequires: python3-cffi >= 1.1
30 BuildRequires: python3-devel >= 1:3.4
31 BuildRequires: python3-setuptools
33 BuildRequires: python3-pytest >= 3.2.1
34 BuildRequires: python3-six >= 1.4.1
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
39 Requires: python-modules >= 1:2.7
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 This library should be compatible with py-bcrypt.
45 %description -l pl.UTF-8
46 Biblioteka powinna być zgodna z biblioteką py-bcrypt.
48 %package -n python3-%{module}
49 Summary: Library for password hashing for your software and your servers
50 Summary(pl.UTF-8): Biblioteka do tworzenia skrótów haseł dla programów i serwerów
51 Group: Libraries/Python
52 Requires: python3-modules >= 1:3.4
54 %description -n python3-%{module}
55 This library should be compatible with py-bcrypt.
57 %description -n python3-%{module} -l pl.UTF-8
58 Biblioteka powinna być zgodna z biblioteką py-bcrypt.
61 %setup -q -n %{module}-%{version}
65 %py_build %{?with_tests:test}
69 %py3_build %{?with_tests:test}
73 rm -rf $RPM_BUILD_ROOT
86 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
92 %dir %{py_sitedir}/bcrypt
93 %attr(755,root,root) %{py_sitedir}/bcrypt/*.so
94 %{py_sitedir}/bcrypt/*.py[co]
95 %{py_sitedir}/bcrypt-%{version}-py*.egg-info
99 %files -n python3-%{module}
100 %defattr(644,root,root,755)
102 %dir %{py3_sitedir}/bcrypt
103 %attr(755,root,root) %{py3_sitedir}/bcrypt/*.so
104 %{py3_sitedir}/bcrypt/*.py
105 %{py3_sitedir}/bcrypt/__pycache__
106 %{py3_sitedir}/bcrypt-%{version}-py*.egg-info