upstream/openstack/python-django-openstack-auth/centos/meta_patches/0008-Build-python-wheel.patch

59 lines
1.7 KiB
Diff

From 1a5349cf73177d155a3309737635bc1ae22ae051 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Mon, 17 Dec 2018 09:16:20 -0600
Subject: [PATCH] Build python wheel
---
SPECS/python-django-openstack-auth.spec | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/SPECS/python-django-openstack-auth.spec b/SPECS/python-django-openstack-auth.spec
index 89acf21..5e9e8e0 100644
--- a/SPECS/python-django-openstack-auth.spec
+++ b/SPECS/python-django-openstack-auth.spec
@@ -39,6 +39,8 @@ Summary: Django authentication backend for OpenStack Keystone
%{?python_provide:%python_provide python2-django-openstack-auth}
BuildRequires: python2-devel
BuildRequires: python-setuptools
+BuildRequires: python2-pip
+BuildRequires: python2-wheel
BuildRequires: python-sphinx
BuildRequires: python-keystoneclient
BuildRequires: python-iso8601
@@ -135,6 +137,7 @@ find . -name "django.po" -exec rm -f '{}' \;
%{__python} setup.py build
+%py2_build_wheel
%if 0%{?with_python3}
%{__python3} setup.py build
@@ -145,6 +148,8 @@ find . -name "django.po" -exec rm -f '{}' \;
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
+mkdir -p $RPM_BUILD_ROOT/wheels
+install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
cp -r openstack_auth/locale %{buildroot}/%{python_sitelib}/openstack_auth
@@ -189,6 +194,15 @@ rm -rf %{buildroot}/%{python3_sitelib}/openstack_auth/tests
%{python3_sitelib}/%{pypi_name}-*.egg-info
%endif
+%package wheels
+Summary: %{name} wheels
+
+%description wheels
+Contains python wheels for %{name}
+
+%files wheels
+/wheels/*
+
%changelog
* Mon Aug 21 2017 Alfredo Moralejo <amoralej@redhat.com> 3.5.0-1
- Update to 3.5.0
--
1.8.3.1