Add hooks for python wheel generation

This update adds hooks to the spec files for the following packages
to generate wheels for the python modules:
- distributedcloud-client-wheels
- distributedcloud-wheels
- gnocchi-wheels
- openstack-ceilometer-wheels
- openstack-cinder-wheels
- openstack-glance-wheels
- openstack-heat-wheels
- openstack-ironic-wheels
- openstack-keystone-wheels
- openstack-magnum-ui-wheels
- openstack-magnum-wheels
- openstack-murano-ui-wheels
- openstack-murano-wheels
- openstack-neutron-wheels
- openstack-nova-wheels
- python-ceilometerclient-wheels
- python-cinderclient-wheels
- python-django-horizon-wheels
- python-glanceclient-wheels
- python-gnocchiclient-wheels
- python-ironicclient-wheels
- python-magnumclient-wheels
- python-muranoclient-wheels
- python-networking-bgpvpn-wheels
- python-networking-odl-wheels
- python-networking-sfc-wheels
- python-neutronclient-wheels
- python-neutron-dynamic-routing-wheels
- python-neutron-lib-wheels
- python-novaclient-wheels
- python-openstacksdk-wheels

Change-Id: I35ac2c82ea32c516488dc3ea2a86d9a4ca57051e
Story: 2003907
Task: 27530
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2018-10-22 16:54:08 -04:00
parent 1eda2ca8f3
commit 8355cde28e
2 changed files with 15 additions and 0 deletions

1
centos_wheels.inc Normal file
View File

@ -0,0 +1 @@
distributedcloud-wheels

View File

@ -34,6 +34,8 @@ BuildRequires: python-cryptography
BuildRequires: python2-devel
BuildRequires: python-eventlet
BuildRequires: python-setuptools
BuildRequires: python2-pip
BuildRequires: python2-wheel
BuildRequires: python-jsonschema >= 2.0.0
BuildRequires: python-keyring
BuildRequires: python-keystonemiddleware
@ -91,6 +93,7 @@ rm -rf {test-,}requirements.txt tools/{pip,test}-requires
%build
export PBR_VERSION=%{version}
%{__python2} setup.py build
%py2_build_wheel
# Generate sample config and add the current directory to PYTHONPATH so
# oslo-config-generator doesn't skip heat's entry points.
PYTHONPATH=. oslo-config-generator --config-file=./dcmanager/config-generator.conf
@ -101,6 +104,8 @@ PYTHONPATH=. oslo-config-generator --config-file=./dcorch/config-generator.conf
export PBR_VERSION=%{version}
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} \
--single-version-externally-managed
mkdir -p $RPM_BUILD_ROOT/wheels
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
mkdir -p %{buildroot}/var/log/dcmanager
mkdir -p %{buildroot}/var/cache/dcmanager
mkdir -p %{buildroot}/var/run/dcmanager
@ -185,3 +190,12 @@ getent passwd dcorch >/dev/null || \
useradd --uid 173 -r -g dcorch -d /var/lib/dcorch -s /sbin/nologin \
-c "dcorch Daemons" dcorch
exit 0
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/wheels/*