]> git.pld-linux.org Git - packages/python-bcrypt.git/blob - python-bcrypt.spec
ccc68a318984d7996947d73ca085f4388db7f19a
[packages/python-bcrypt.git] / python-bcrypt.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  bcrypt
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}
11 Version:        3.1.7
12 Release:        4
13 License:        Apache v2.0
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/
19 %if %{with python2}
20 BuildRequires:  python-cffi >= 1.1
21 BuildRequires:  python-devel >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-pytest >= 3.2.1
25 BuildRequires:  python-six >= 1.4.1
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-cffi >= 1.1
30 BuildRequires:  python3-devel >= 1:3.4
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-pytest >= 3.2.1
34 BuildRequires:  python3-six >= 1.4.1
35 %endif
36 %endif
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)
41
42 %description
43 This library should be compatible with py-bcrypt.
44
45 %description -l pl.UTF-8
46 Biblioteka powinna być zgodna z biblioteką py-bcrypt.
47
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
53
54 %description -n python3-%{module}
55 This library should be compatible with py-bcrypt.
56
57 %description -n python3-%{module} -l pl.UTF-8
58 Biblioteka powinna być zgodna z biblioteką py-bcrypt.
59
60 %prep
61 %setup -q -n %{module}-%{version}
62
63 %build
64 %if %{with python2}
65 %py_build %{?with_tests:test}
66 %endif
67
68 %if %{with python3}
69 %py3_build %{?with_tests:test}
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 %if %{with python2}
76 %py_install
77
78 %py_postclean
79 %endif
80
81 %if %{with python3}
82 %py3_install
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %files
90 %defattr(644,root,root,755)
91 %doc README.rst
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
96 %endif
97
98 %if %{with python3}
99 %files -n python3-%{module}
100 %defattr(644,root,root,755)
101 %doc README.rst
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
107 %endif
This page took 0.027178 seconds and 2 git commands to generate.