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