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