]> git.pld-linux.org Git - packages/python-bcrypt.git/blob - python-bcrypt.spec
up to 3.1.6
[packages/python-bcrypt.git] / python-bcrypt.spec
1 #
2 # Conditional build:
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
7
8 %define         module  bcrypt
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}
12 Version:        3.1.6
13 Release:        1
14 License:        Apache v2.0
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
22 %if %{with python2}
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
31 %endif
32 %if %{with python3}
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
41 %endif
42 Requires:       python-cffi > 0.8
43 Requires:       python-modules
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
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
49
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
53
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
60
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
64
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
68
69 %package apidocs
70 Summary:        %{module} API documentation
71 Summary(pl.UTF-8):      Dokumentacja API %{module}
72 Group:          Documentation
73
74 %description apidocs
75 API documentation for %{module}.
76
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API %{module}.
79
80 %prep
81 %setup -q -n %{module}-%{version}
82
83 %build
84 %if %{with python2}
85 CC="%{__cc}" \
86 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
87 %py_build %{?with_tests:test}
88 %endif
89
90 %if %{with python3}
91 CC="%{__cc}" \
92 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
93 %py3_build %{?with_tests:test}
94 %endif
95
96 %if %{with doc}
97 cd docs
98 %{__make} -j1 html
99 rm -rf _build/html/_sources
100 %endif
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %py_install
107
108 %py_postclean
109
110 %endif
111
112 %if %{with python3}
113 %py3_install
114
115 %endif
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %if %{with python2}
121 %files
122 %defattr(644,root,root,755)
123 %doc README.rst
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
129 %endif
130 %endif
131
132 %if %{with python3}
133 %files -n python3-%{module}
134 %defattr(644,root,root,755)
135 %doc README.rst
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
142 %endif
143
144 %if %{with doc}
145 %files apidocs
146 %defattr(644,root,root,755)
147 %doc docs/_build/html/*
148 %endif
This page took 0.056981 seconds and 3 git commands to generate.