]> git.pld-linux.org Git - packages/python-bcrypt.git/blame - python-bcrypt.spec
rebuild with python 3.10
[packages/python-bcrypt.git] / python-bcrypt.spec
CommitLineData
8668c912
MK
1#
2# Conditional build:
6690e1f2 3%bcond_without tests # unit tests
8668c912
MK
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
aa948903 7%define module bcrypt
8668c912 8Summary: Library for password hashing for your software and your servers
6690e1f2 9Summary(pl.UTF-8): Biblioteka do tworzenia skrótów haseł dla programów i serwerów
8668c912 10Name: python-%{module}
6690e1f2 11Version: 3.1.7
6064e45a 12Release: 5
8668c912
MK
13License: Apache v2.0
14Group: Libraries/Python
6690e1f2
JB
15#Source0Download: https://pypi.org/simple/bcrypt/
16Source0: https://files.pythonhosted.org/packages/source/b/bcrypt/%{module}-%{version}.tar.gz
17# Source0-md5: 5d6f93b575ce52470af37a8e7dce76fe
8668c912 18URL: https://github.com/dstufft/bcrypt/
8668c912 19%if %{with python2}
6690e1f2
JB
20BuildRequires: python-cffi >= 1.1
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-pytest >= 3.2.1
25BuildRequires: python-six >= 1.4.1
26%endif
8668c912
MK
27%endif
28%if %{with python3}
6690e1f2
JB
29BuildRequires: python3-cffi >= 1.1
30BuildRequires: python3-devel >= 1:3.4
31BuildRequires: python3-setuptools
32%if %{with tests}
33BuildRequires: python3-pytest >= 3.2.1
34BuildRequires: python3-six >= 1.4.1
8668c912 35%endif
6690e1f2
JB
36%endif
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
39Requires: python-modules >= 1:2.7
8668c912
MK
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
6690e1f2 43This library should be compatible with py-bcrypt.
8668c912
MK
44
45%description -l pl.UTF-8
6690e1f2 46Biblioteka powinna być zgodna z biblioteką py-bcrypt.
8668c912
MK
47
48%package -n python3-%{module}
49Summary: Library for password hashing for your software and your servers
6690e1f2 50Summary(pl.UTF-8): Biblioteka do tworzenia skrótów haseł dla programów i serwerów
8668c912 51Group: Libraries/Python
6690e1f2 52Requires: python3-modules >= 1:3.4
8668c912
MK
53
54%description -n python3-%{module}
6690e1f2 55This library should be compatible with py-bcrypt.
8668c912
MK
56
57%description -n python3-%{module} -l pl.UTF-8
6690e1f2 58Biblioteka powinna być zgodna z biblioteką py-bcrypt.
8668c912
MK
59
60%prep
61%setup -q -n %{module}-%{version}
62
63%build
64%if %{with python2}
4ba1cbb2 65%py_build %{?with_tests:test}
8668c912
MK
66%endif
67
68%if %{with python3}
4ba1cbb2 69%py3_build %{?with_tests:test}
8668c912
MK
70%endif
71
8668c912
MK
72%install
73rm -rf $RPM_BUILD_ROOT
74
75%if %{with python2}
4ba1cbb2 76%py_install
b4d459de 77
8668c912 78%py_postclean
8668c912
MK
79%endif
80
81%if %{with python3}
4ba1cbb2 82%py3_install
8668c912
MK
83%endif
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
88%if %{with python2}
89%files
90%defattr(644,root,root,755)
91%doc README.rst
6690e1f2 92%dir %{py_sitedir}/bcrypt
f663ae85 93%attr(755,root,root) %{py_sitedir}/bcrypt/*.so
6690e1f2
JB
94%{py_sitedir}/bcrypt/*.py[co]
95%{py_sitedir}/bcrypt-%{version}-py*.egg-info
8668c912
MK
96%endif
97
98%if %{with python3}
99%files -n python3-%{module}
100%defattr(644,root,root,755)
101%doc README.rst
6690e1f2 102%dir %{py3_sitedir}/bcrypt
f663ae85 103%attr(755,root,root) %{py3_sitedir}/bcrypt/*.so
6690e1f2
JB
104%{py3_sitedir}/bcrypt/*.py
105%{py3_sitedir}/bcrypt/__pycache__
106%{py3_sitedir}/bcrypt-%{version}-py*.egg-info
8668c912 107%endif
This page took 0.086 seconds and 4 git commands to generate.