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: - configutilities - controllerconfig - cgts-client - sysinv Change-Id: I340db4c6516c9bf8badbdd0ecdcf61670e168aea Story: 2003907 Task: 27524 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
8a1afec67c
commit
4095ac7005
|
@ -0,0 +1,4 @@
|
||||||
|
cgts-client-wheels
|
||||||
|
configutilities-wheels
|
||||||
|
controllerconfig-wheels
|
||||||
|
sysinv-wheels
|
|
@ -12,6 +12,8 @@ Source1: LICENSE
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-netaddr
|
Requires: python-netaddr
|
||||||
#Requires: wxPython
|
#Requires: wxPython
|
||||||
|
|
||||||
|
@ -35,6 +37,7 @@ SDK files for configutilities
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
||||||
|
@ -42,6 +45,8 @@ SDK files for configutilities
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
sed -i "s#xxxSW_VERSIONxxx#%{platform_release}#" %{name}/common/validator.py
|
sed -i "s#xxxSW_VERSIONxxx#%{platform_release}#" %{name}/common/validator.py
|
||||||
tar czf %{cgcs_sdk_tarball_name} %{name}
|
tar czf %{cgcs_sdk_tarball_name} %{name}
|
||||||
|
@ -62,3 +67,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files -n %{name}-cgts-sdk
|
%files -n %{name}-cgts-sdk
|
||||||
%{cgcs_sdk_deploy_dir}/%{cgcs_sdk_tarball_name}
|
%{cgcs_sdk_deploy_dir}/%{cgcs_sdk_tarball_name}
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
|
|
@ -9,6 +9,8 @@ URL: unknown
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
Requires: python-netaddr
|
Requires: python-netaddr
|
||||||
Requires: python-keyring
|
Requires: python-keyring
|
||||||
|
@ -36,6 +38,7 @@ Controller node configuration
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
# TODO: NO_GLOBAL_PY_DELETE (see python-byte-compile.bbclass), put in macro/script
|
# TODO: NO_GLOBAL_PY_DELETE (see python-byte-compile.bbclass), put in macro/script
|
||||||
%install
|
%install
|
||||||
|
@ -44,6 +47,8 @@ Controller node configuration
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{local_bindir}
|
install -d -m 755 %{buildroot}%{local_bindir}
|
||||||
install -p -D -m 700 scripts/keyringstaging %{buildroot}%{local_bindir}/keyringstaging
|
install -p -D -m 700 scripts/keyringstaging %{buildroot}%{local_bindir}/keyringstaging
|
||||||
|
@ -84,3 +89,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%dir %{local_etc_upgraded}
|
%dir %{local_etc_upgraded}
|
||||||
%{local_etc_upgraded}/*
|
%{local_etc_upgraded}/*
|
||||||
%{local_etc_systemd}/*
|
%{local_etc_systemd}/*
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
|
|
@ -10,6 +10,8 @@ Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-httplib2
|
Requires: python-httplib2
|
||||||
Requires: python-prettytable
|
Requires: python-prettytable
|
||||||
Requires: bash-completion
|
Requires: bash-completion
|
||||||
|
@ -40,6 +42,7 @@ rm -rf *.egg-info
|
||||||
%build
|
%build
|
||||||
export PBR_VERSION=%{version}
|
export PBR_VERSION=%{version}
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export PBR_VERSION=%{version}
|
export PBR_VERSION=%{version}
|
||||||
|
@ -48,6 +51,8 @@ export PBR_VERSION=%{version}
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{local_etc_bash_completiond}
|
install -d -m 755 %{buildroot}%{local_etc_bash_completiond}
|
||||||
install -p -D -m 664 tools/system.bash_completion %{buildroot}%{local_etc_bash_completiond}/system.bash_completion
|
install -p -D -m 664 tools/system.bash_completion %{buildroot}%{local_etc_bash_completiond}/system.bash_completion
|
||||||
|
@ -71,3 +76,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files sdk
|
%files sdk
|
||||||
/usr/share/remote-clients/python-wrs-system-client-%{version}.tgz
|
/usr/share/remote-clients/python-wrs-system-client-%{version}.tgz
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
|
|
@ -10,6 +10,8 @@ Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
BuildRequires: python-pbr
|
BuildRequires: python-pbr
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-pyudev
|
Requires: python-pyudev
|
||||||
Requires: pyparted
|
Requires: pyparted
|
||||||
Requires: python-ipaddr
|
Requires: python-ipaddr
|
||||||
|
@ -39,6 +41,7 @@ rm -rf *.egg-info
|
||||||
%build
|
%build
|
||||||
export PBR_VERSION=%{version}
|
export PBR_VERSION=%{version}
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export PBR_VERSION=%{version}
|
export PBR_VERSION=%{version}
|
||||||
|
@ -47,6 +50,8 @@ export PBR_VERSION=%{version}
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{local_etc_goenabledd}
|
install -d -m 755 %{buildroot}%{local_etc_goenabledd}
|
||||||
install -p -D -m 755 etc/sysinv/sysinv_goenabled_check.sh %{buildroot}%{local_etc_goenabledd}/sysinv_goenabled_check.sh
|
install -p -D -m 755 etc/sysinv/sysinv_goenabled_check.sh %{buildroot}%{local_etc_goenabledd}/sysinv_goenabled_check.sh
|
||||||
|
@ -116,3 +121,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_bindir}/sysinv-upgrade
|
%{_bindir}/sysinv-upgrade
|
||||||
%{_bindir}/sysinv-puppet
|
%{_bindir}/sysinv-puppet
|
||||||
%{_bindir}/sysinv-helm
|
%{_bindir}/sysinv-helm
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
|
Loading…
Reference in New Issue