Adapt rpm package build to new setup.py
- Review install script to use the --prefix option, install doc in the corerct place (/usr/share/doc) and fix the wrong placement of the conf file for now - Declare new macros (which are not used yet BTW) - Fix the spec file for new loactions - Adds urllib3 to python dependencies
This commit is contained in:
parent
d94b5d4850
commit
a6799130e8
17
install.sh
17
install.sh
@ -1,17 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Syntax: install.sh <Root Dir> <Python SiteLib> <Prefix>
|
# Syntax: install.sh <Root Dir> <Python SiteLib> <Prefix>
|
||||||
|
set -x
|
||||||
|
|
||||||
export rootdir=$1
|
export rootdir=$1
|
||||||
export sitelib=$2
|
export sitelib=$2
|
||||||
export prefix=$3
|
export prefix=$3
|
||||||
python setup.py install --skip-build --root $rootdir
|
#python setup.py install --skip-build --prefix=$prefix
|
||||||
|
python setup.py install --skip-build --root=$rootdir --prefix=$prefix
|
||||||
rm -rf $rootdir/$sitelib/redfish/old
|
rm -rf $rootdir/$sitelib/redfish/old
|
||||||
|
|
||||||
for i in 1; do
|
for i in 1; do
|
||||||
mkdir -p $rootdir/$prefix/man/man$i
|
mkdir -p $rootdir/$prefix/share/man/man$i
|
||||||
install -m 644 doc/build/man/*.$i $rootdir/$prefix/man/man$i
|
install -m 644 doc/build/man/*.$i $rootdir/$prefix/share/man/man$i
|
||||||
done
|
done
|
||||||
install -d 755 $rootdir/$prefix/doc/PBPKG/html/_static
|
install -d 755 $rootdir/$prefix/share/doc/PBPKG/html/_static
|
||||||
install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/doc/PBPKG/html
|
install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/share/doc/PBPKG/html
|
||||||
install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/doc/PBPKG/html/_static
|
install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/share/doc/PBPKG/html/_static
|
||||||
|
# Hardcoded for now to solve the delivery of the conf file still not correct with setup.py
|
||||||
|
mkdir -p $rootdir/etc
|
||||||
|
mv $rootdir/$prefix/etc/redfish-client.conf $rootdir/etc/redfish-client.conf
|
||||||
|
@ -66,3 +66,6 @@ filter PBURL = http://github.com/bcornec/python-redfish
|
|||||||
# PBLOG is replaced by the changelog if value is yes
|
# PBLOG is replaced by the changelog if value is yes
|
||||||
# and should be last as when used we need the %pb hash filled
|
# and should be last as when used we need the %pb hash filled
|
||||||
filter PBLOG = yes
|
filter PBLOG = yes
|
||||||
|
|
||||||
|
filter PBCONFFILE = /etc/redfish-client.conf
|
||||||
|
filter PBTEMPLATEPATH = /usr/share/redfish-client/templates
|
||||||
|
@ -130,7 +130,7 @@ defpkgdir python-redfish = .
|
|||||||
|
|
||||||
# List of files per pkg on which to apply filters
|
# List of files per pkg on which to apply filters
|
||||||
# Files are mentioned relatively to pbroot/defpkgdir
|
# Files are mentioned relatively to pbroot/defpkgdir
|
||||||
filteredfiles python-redfish = redfish-client/redfish-client,doc/source/conf.py,install.sh
|
filteredfiles python-redfish = redfish-client/redfish-client,doc/source/conf.py,setup.py,./redfish-client/etc/redfish-client.conf,install.sh
|
||||||
#supfiles python-redfish = python-redfish.init
|
#supfiles python-redfish = python-redfish.init
|
||||||
|
|
||||||
# For perl modules, names are different depending on distro
|
# For perl modules, names are different depending on distro
|
||||||
|
@ -35,13 +35,10 @@ make latexpdf
|
|||||||
%files
|
%files
|
||||||
%doc README.rst examples/[a-z]*.py LICENSE
|
%doc README.rst examples/[a-z]*.py LICENSE
|
||||||
%doc doc/build/latex/*.pdf
|
%doc doc/build/latex/*.pdf
|
||||||
%doc %{_docdir}/%{name}/html
|
|
||||||
%doc %{_docdir}/%{name}/html/*.html
|
|
||||||
%doc %{_docdir}/%{name}/html/_static
|
|
||||||
%doc %{_docdir}/%{name}/html/_static/*
|
|
||||||
%{_bindir}/redfish-client
|
%{_bindir}/redfish-client
|
||||||
# add conf file
|
%dir %{_datadir}/redfish-client
|
||||||
# add template
|
%{_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/tests/*.py*
|
%{python_sitelib}/redfish/tests/*.py*
|
||||||
|
@ -8,6 +8,7 @@ Jinja2>=2.7.3
|
|||||||
Sphinx>=1.2.3
|
Sphinx>=1.2.3
|
||||||
docopt>=0.6.2
|
docopt>=0.6.2
|
||||||
simplejson>=3.8.1
|
simplejson>=3.8.1
|
||||||
|
urllib3>=1.9
|
||||||
|
|
||||||
# Python3 compat
|
# Python3 compat
|
||||||
future>=0.15.2
|
future>=0.15.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user