Update after bug:1515255
[openstack-build/django_openstack_auth-build.git] / centos7 / rpm / SPECS / python-django-openstack-auth.spec
1 %if 0%{?fedora}
2 # python3-keystoneclient missing
3 # python3-oslo-policy missing
4 %global with_python3 0
5
6 %endif
7 %global pypi_name django_openstack_auth
8
9 Name:           python-django-openstack-auth
10 Version:        2.0.0
11 Release:        2%{?dist}~mos8.0.2
12 Summary:        Django authentication backend for OpenStack Keystone
13
14 License:        BSD
15 URL:            http://pypi.python.org/pypi/django_openstack_auth/
16 Source0:        http://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17 Patch0:         0010-Translate-update.patch
18
19 BuildArch:      noarch
20
21
22
23 %description
24 Django OpenStack Auth is a pluggable Django authentication backend that
25 works with Django's ``contrib.auth`` framework to authenticate a user against
26 OpenStack's Keystone Identity API.
27
28 The current version is designed to work with the
29 Keystone V2 API.
30
31 %package -n python2-django-openstack-auth
32 Summary:        Django authentication backend for OpenStack Keystone
33
34 %{?python_provide:%python_provide python2-django-openstack-auth}
35 BuildRequires:  python2-devel
36 BuildRequires:  python-setuptools
37 BuildRequires:  python-sphinx
38 BuildRequires:  python-keystoneclient
39 BuildRequires:  python-iso8601
40 BuildRequires:  python-pbr >= 1.6
41 BuildRequires:  python-netaddr
42 BuildRequires:  python-oslo-sphinx >= 2.3.0
43 BuildRequires:  gettext
44 BuildRequires:  python-oslo-config >= 2.3.0
45 BuildRequires:  python-oslo-policy >= 0.5.0
46 BuildRequires:  python-mox3
47 BuildRequires:  python-mock
48 BuildRequires:  python-testscenarios
49
50 Requires:       python-django
51 BuildRequires:  python-django
52
53 Requires:       python-keystoneclient >= 1:1.6.0
54 Requires:       python-six >= 1.9.0
55 Requires:       python-oslo-config >= 2.3.0
56 Requires:       python-oslo-policy >= 0.5.0
57 Requires:       python-pbr >= 1.6
58
59 %description -n python2-django-openstack-auth
60 Django OpenStack Auth is a pluggable Django authentication backend that
61 works with Django's ``contrib.auth`` framework to authenticate a user against
62 OpenStack's Keystone Identity API.
63
64 The current version is designed to work with the
65 Keystone V2 API.
66
67
68 %if 0%{?with_python3}
69
70 %package -n python3-django-openstack-auth
71 Summary:        Django authentication backend for OpenStack Keystone
72
73 %{?python_provide:%python_provide python3-django-openstack-auth}
74 BuildRequires:  python3-devel
75 BuildRequires:  python3-setuptools
76 BuildRequires:  python3-sphinx
77 BuildRequires:  python3-keystoneclient
78 BuildRequires:  python3-iso8601
79 BuildRequires:  python3-pbr >= 1.6
80 BuildRequires:  python3-netaddr
81 BuildRequires:  python3-oslo-sphinx >= 2.3.0
82 BuildRequires:  gettext
83 BuildRequires:  python3-oslo-config >= 2.3.0
84 BuildRequires:  python3-oslo-policy >= 0.5.0
85 BuildRequires:  python3-mock
86 BuildRequires:  python3-mox3
87 BuildRequires:  python3-testscenarios
88
89 Requires:       python3-django
90 BuildRequires:  python3-django
91
92 Requires:       python3-keystoneclient >= 1:1.6.0
93 Requires:       python3-six >= 1.9.0
94 Requires:       python3-oslo-config >= 2.3.0
95 Requires:       python3-oslo-policy >= 0.5.0
96 Requires:       python3-pbr >= 1.6
97
98 %description -n python3-django-openstack-auth
99 Django OpenStack Auth is a pluggable Django authentication backend that
100 works with Django's ``contrib.auth`` framework to authenticate a user against
101 OpenStack's Keystone Identity API.
102
103 The current version is designed to work with the
104 Keystone V2 API.
105
106
107 %endif
108
109
110
111 %prep
112 %setup -q -n %{pypi_name}-%{version}
113
114
115 # Remove the requirements file so that pbr hooks don't add it
116 # to distutils requires_dist config
117 rm -f {test-,}requirements.txt
118 %patch0 -p1
119
120 %build
121 # generate translations
122 cd openstack_auth && django-admin compilemessages && cd ..
123
124 # remove unnecessary .po files
125 find . -name "django.po" -exec rm -f '{}' \;
126
127
128 %{__python} setup.py build
129
130 %if 0%{?with_python3}
131 %{__python3} setup.py build
132 %endif
133
134 # generate html docs
135 PYTHONPATH=.:$PYTHONPATH sphinx-build doc/source html
136
137 %install
138 %{__python} setup.py install --skip-build --root %{buildroot}
139
140 cp -r openstack_auth/locale %{buildroot}/%{python_sitelib}/openstack_auth
141
142 %find_lang django
143
144 # don't include tests in the RPM
145 rm -rf %{buildroot}/%{python_sitelib}/openstack_auth/tests
146
147 %if 0%{?with_python3}
148 %{__python3} setup.py install --skip-build --root %{buildroot}
149 %endif
150
151
152 %check
153 export PYTHONPATH=$PYTHONPATH
154 %{__python} openstack_auth/tests/run_tests.py
155
156 %files -n python2-django-openstack-auth -f django.lang
157 %license LICENSE
158 %dir %{python_sitelib}/openstack_auth
159 %dir %{python_sitelib}/openstack_auth/locale
160 %dir %{python_sitelib}/openstack_auth/locale/??/
161 %dir %{python_sitelib}/openstack_auth/locale/??_??/
162 %dir %{python_sitelib}/openstack_auth/locale/??/LC_MESSAGES
163 %dir %{python_sitelib}/openstack_auth/locale/??_??/LC_MESSAGES
164 %{python_sitelib}/openstack_auth/*.py*
165 %{python_sitelib}/openstack_auth/plugin
166 %{python_sitelib}/openstack_auth/locale/openstack_auth.pot
167 %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
168
169 %if 0%{?with_python3}
170 %files -n python3-django-openstack-auth -f django.lang
171 %license LICENSE
172 %dir %{python3_sitelib}/openstack_auth
173 %dir %{python3_sitelib}/openstack_auth/locale
174 %dir %{python3_sitelib}/openstack_auth/locale/??/
175 %dir %{python3_sitelib}/openstack_auth/locale/??_??/
176 %dir %{python3_sitelib}/openstack_auth/locale/??/LC_MESSAGES
177 %dir %{python3_sitelib}/openstack_auth/locale/??_??/LC_MESSAGES
178 %{python3_sitelib}/openstack_auth/*.py*
179 %{python3_sitelib}/openstack_auth/plugin
180 %{python3_sitelib}/openstack_auth/locale/openstack_auth.pot
181 %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
182 %endif
183
184 %changelog
185 * Thu Oct 08 2015 Valeriy Sakharov <vsakharov@mirantis.com> - 2.0.0-1%{?dist}~mos8.0.2
186 - Added Translate-update.patch
187
188 * Thu Sep 24 2015 Alexander Tsamutali <atsamutali@mirantis.com> - 2.0.0-1%{?dist}~mos8.0.1
189 - Rebuild for MOS 8.0.
190
191 * Tue Sep 22 2015 Matthias Runge <mrunge@redhat.com> - 2.0.0-1
192 - update to 2.0.0
193 - (theoretically) support python3
194 - really execute tests
195
196 * Fri Aug 21 2015 Matthias Runge <mrunge@redhat.com> - 1.2.0-5
197 - backport initialize hasher for unscoped token
198 - backport Extend User from AbstractBaseUser
199 - backport configurable token hasing
200 - use unscoped token for scoping the project
201
202 * Fri Jun 19 2015 Matthias Runge <mrunge@redhat.com> - 1.2.0-4
203 - "App 'openstack_auth' doesn't have a 'user' model." (rhbz#1232683)
204
205 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
206 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
207
208 * Fri May 08 2015 Alan Pevec <apevec@redhat.com> - 1.2.0-2
209 - update Use AbstractUser instead of AnonymousUser (mrunge)
210   Fixes rhbz#1218894 rhbz#1218899
211 - drop pbr.version removal
212
213 * Tue Apr 14 2015 Matthias Runge <mrunge@redhat.com> - 1.2.0-1
214 - rebase to 1.2.0
215 - Use AbstractUser instead of AnonymousUser
216
217 * Wed Feb 04 2015 Matthias Runge <mrunge@redhat.com> - 1.1.9-1
218 - rebase to 1.1.9 (rhbz#1145024)
219
220 * Thu Dec 11 2014 Matthias Runge <mrunge@redhat.com> - 1.1.7-3
221 - fix CVE-2014-8124 (rhbz#1170421)
222
223 * Thu Nov 13 2014 Matthias Runge <mrunge@redhat.com> - 1.1.7-2
224 - own locale dirs (rhbz#1163362)
225
226 * Fri Sep 26 2014 Matthias Runge <mrunge@redhat.com> - 1.1.7-1
227 - update to 1.1.7 (rhbz#1145024)
228
229 * Thu Sep 11 2014 Matthias Runge <mrunge@redhat.com> - 1.1.6-3
230 - spec cleanup
231
232 * Mon Aug 25 2014 Matthias Runge <mrunge@redhat.com> - 1.1.6-2
233 - bump version
234
235 * Mon Jun 23 2014 Matthias Runge <mrunge@redhat.com> - 1.1.6-1
236 - update to 1.1.6 (rhbz#1111877)