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