Fix RPM build
- Create a new python-redfish-data package in order to share common content between python2 and python3 packages - Fix python3 package by renaming binaries to allow joint installation of python2 and python3 packages - Adds encapsulation of tests - Fix doc package build Change-Id: I3579663e77dd55b7162a3d1346bf6cd00f73c0a5
This commit is contained in:
parent
2167911d02
commit
b0196258ff
@ -12,7 +12,7 @@ License: PBLIC
|
|||||||
Group: PBGRP
|
Group: PBGRP
|
||||||
Url: PBURL
|
Url: PBURL
|
||||||
Source: PBREPO/PBSRC
|
Source: PBREPO/PBSRC
|
||||||
Requires: PBPYTHON2DEP
|
Requires: PBPYTHON2DEP,PBREALPKG-data
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: PBPYTHON2BDEP, PB2PYTHON2BDEP
|
BuildRequires: PBPYTHON2BDEP, PB2PYTHON2BDEP
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ Python2 version.
|
|||||||
%if %{?with_python3}
|
%if %{?with_python3}
|
||||||
%package -n PBPYTHON3PKG
|
%package -n PBPYTHON3PKG
|
||||||
Summary: %{summary} / Python 3 library
|
Summary: %{summary} / Python 3 library
|
||||||
BuildRequires: PBPYTHON3BDEP, PB2PYTHON3BDEP
|
BuildRequires: PBPYTHON3BDEP,PB2PYTHON3BDEP
|
||||||
Requires: PBPYTHON3DEP
|
Requires: PBPYTHON3DEP,PBREALPKG-data
|
||||||
|
|
||||||
%description -n PBPYTHON3PKG
|
%description -n PBPYTHON3PKG
|
||||||
PBDESC
|
PBDESC
|
||||||
@ -33,13 +33,20 @@ Python3 version.
|
|||||||
|
|
||||||
%package -n PBREALPKG-doc
|
%package -n PBREALPKG-doc
|
||||||
Summary: %{summary} / Documentation
|
Summary: %{summary} / Documentation
|
||||||
BuildRequires: PBPYTHON2BDEP, PB2PYTHON2BDEP
|
BuildRequires: PBPYTHON2BDEP,PB2PYTHON2BDEP
|
||||||
Requires: PBPYTHON2DEP
|
Requires: PBPYTHON2DEP
|
||||||
|
|
||||||
%description -n PBREALPKG-doc
|
%description -n PBREALPKG-doc
|
||||||
PBDESC
|
PBDESC
|
||||||
Documentation
|
Documentation
|
||||||
|
|
||||||
|
%package -n PBREALPKG-data
|
||||||
|
Summary: %{summary} / Data
|
||||||
|
|
||||||
|
%description -n PBREALPKG-data
|
||||||
|
PBDESC
|
||||||
|
Data
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}PBEXTDIR
|
%setup -q -n %{name}-%{version}PBEXTDIR
|
||||||
# Fix for now as long as setuptools isn't more recent in distributions
|
# Fix for now as long as setuptools isn't more recent in distributions
|
||||||
@ -68,6 +75,15 @@ make singlehtml
|
|||||||
make latexpdf
|
make latexpdf
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
||||||
|
%if %{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
./install.sh %{__python3} %{buildroot} %{python3_sitelib} %{_prefix} PBPYTHON3PKG
|
||||||
|
mv %{buildroot}%{_bindir}/redfish-client %{buildroot}%{_bindir}/redfish-client-%{python3_version}
|
||||||
|
mv %{buildroot}%{_bindir}/redfish-check-cartridge %{buildroot}%{_bindir}/redfish-check-cartridge-%{python3_version}
|
||||||
|
popd
|
||||||
|
%endif # if with_python3
|
||||||
|
|
||||||
./install.sh %{__python} %{buildroot} %{python_sitelib} %{_prefix} PBPKG
|
./install.sh %{__python} %{buildroot} %{python_sitelib} %{_prefix} PBPKG
|
||||||
|
|
||||||
./install.sh doc %{buildroot} %{python_sitelib} %{_prefix} PBPKG
|
./install.sh doc %{buildroot} %{python_sitelib} %{_prefix} PBPKG
|
||||||
@ -77,24 +93,16 @@ for i in `ls %{buildroot}/%{_mandir}/man1/*-py2.1*`; do
|
|||||||
cp -a $i $j
|
cp -a $i $j
|
||||||
done
|
done
|
||||||
|
|
||||||
%if %{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
./install.sh %{__python3} %{buildroot} %{python3_sitelib} %{_prefix} PBPYTHON3PKG
|
|
||||||
popd
|
|
||||||
%endif # if with_python3
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.rst examples/[a-z]*.py LICENSE
|
%doc README.rst examples/[a-z]*.py LICENSE AUTHORS ChangeLog
|
||||||
%exclude %{_docdir}/PBREALPKG/html
|
%exclude %{_docdir}/PBREALPKG/manual/html
|
||||||
%exclude %{_docdir}/PBREALPKG/*.pdf
|
%exclude %{_docdir}/PBREALPKG/manual/*.pdf
|
||||||
%{_bindir}/redfish-client
|
%{_bindir}/redfish-client
|
||||||
%{_bindir}/redfish-check-cartridge
|
%{_bindir}/redfish-check-cartridge
|
||||||
%dir %{_datadir}/redfish-client
|
|
||||||
%{_datadir}/redfish-client/templates/*
|
|
||||||
%config(noreplace) %{_sysconfdir}/redfish-client.conf
|
|
||||||
%dir %{python_sitelib}/redfish
|
%dir %{python_sitelib}/redfish
|
||||||
%{python_sitelib}/redfish/*.py*
|
%{python_sitelib}/redfish/*.py*
|
||||||
%{python_sitelib}/redfish/oem/*.py*
|
%{python_sitelib}/redfish/oem/*.py*
|
||||||
|
%{python_sitelib}/redfish/tests/*.py*
|
||||||
%{python_sitelib}/python_redfish*
|
%{python_sitelib}/python_redfish*
|
||||||
# Needs improvement to host all .1 man pages but not the py3 ones
|
# Needs improvement to host all .1 man pages but not the py3 ones
|
||||||
%{_mandir}/man1/PBREALPKG.1*
|
%{_mandir}/man1/PBREALPKG.1*
|
||||||
@ -103,15 +111,27 @@ popd
|
|||||||
%if %{?with_python3}
|
%if %{?with_python3}
|
||||||
%files -n PBPYTHON3PKG
|
%files -n PBPYTHON3PKG
|
||||||
%doc README.rst examples/[a-z]*.py LICENSE AUTHORS ChangeLog
|
%doc README.rst examples/[a-z]*.py LICENSE AUTHORS ChangeLog
|
||||||
|
%exclude %{_docdir}/PBREALPKG/manual/html
|
||||||
|
%exclude %{_docdir}/PBREALPKG/manual/*.pdf
|
||||||
|
%{_bindir}/redfish-client-%{python3_version}
|
||||||
|
%{_bindir}/redfish-check-cartridge-%{python3_version}
|
||||||
%dir %{python3_sitelib}/redfish
|
%dir %{python3_sitelib}/redfish
|
||||||
%{python3_sitelib}/redfish/*.py*
|
%{python3_sitelib}/redfish/*.py*
|
||||||
%{python3_sitelib}/redfish/oem/*.py*
|
%{python3_sitelib}/redfish/oem/*.py*
|
||||||
%{python3_sitelib}/redfish/oem/__pycache__/*.py*
|
%{python3_sitelib}/redfish/oem/__pycache__/*.py*
|
||||||
%{python3_sitelib}/redfish/__pycache__/*.py*
|
%{python3_sitelib}/redfish/__pycache__/*.py*
|
||||||
|
%{python3_sitelib}/redfish/tests/*.py*
|
||||||
|
%{python3_sitelib}/redfish/tests/__pycache__/*.py*
|
||||||
%{python3_sitelib}/python_redfish*
|
%{python3_sitelib}/python_redfish*
|
||||||
%{_mandir}/man1/*-py3.1*
|
%{_mandir}/man1/*-py3.1*
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
|
%files -n PBREALPKG-data
|
||||||
|
%config(noreplace) %{_sysconfdir}/redfish-client.conf
|
||||||
|
%dir %{_datadir}/redfish-client
|
||||||
|
%{_datadir}/redfish-client/templates/*
|
||||||
|
%{_datadir}/redfish-client/*.txt
|
||||||
|
|
||||||
%files -n PBREALPKG-doc
|
%files -n PBREALPKG-doc
|
||||||
%{_docdir}/PBREALPKG/manual/html/_static/*
|
%{_docdir}/PBREALPKG/manual/html/_static/*
|
||||||
%{_docdir}/PBREALPKG/manual/html/index.html
|
%{_docdir}/PBREALPKG/manual/html/index.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user