Fix rpm build

- Working rpm build For mageia 5 and Fedora 23
- Review mageia 5 and Fedora 23 dependencies and upload missing one on
  ftp server
- pbr not used in package build anymore, called by pb in 0.14.1 version.
  Fully standalone version after sbx2build
- Fix doc production and man pages
- update gitignore for latest pb version
- Remove useless pb filters
- Will become real 0.3 (no code change, just build infra)
This commit is contained in:
Bruno Cornec 2016-04-30 01:02:52 +02:00
parent 81826e6027
commit 8560e6c230
25 changed files with 31 additions and 205 deletions

11
.gitignore vendored
View File

@ -22,6 +22,8 @@ var/
*.egg-info/ *.egg-info/
.installed.cfg .installed.cfg
*.egg *.egg
AUTHORS
ChangeLog
# PyInstaller # PyInstaller
# Usually these files are written by a python script from a template # Usually these files are written by a python script from a template
@ -57,9 +59,12 @@ docs/_build/
# PyBuilder # PyBuilder
target/ target/
# Project-Builder.org # Project-Builder.org 0.14.1
delivery/ pbdelivery/
build/ pbbuild/
# ctags
tags
# Pydev # Pydev
.project .project

View File

@ -4,7 +4,7 @@ FAQ
- Q1 : error in setup command: Invalid environment marker: (python_version < '3') - Q1 : error in setup command: Invalid environment marker: (python_version < '3')
This error is caused by old setuptools revisions that do not understant "python_version < '3'". This error is caused by an old setuptools version that does not understand "python_version < '3'".
Upgrade setuptools using:: Upgrade setuptools using::
pip install --upgrade setuptools pip install --upgrade setuptools

View File

@ -11,17 +11,17 @@ export pkg=$5
# Documentation installation only # Documentation installation only
if [ $python = "doc" ]; then if [ $python = "doc" ]; then
install -d 755 $rootdir/$prefix/share/doc/$5/html/_static install -d 755 $rootdir/$prefix/share/doc/$5/manual/html/_static
install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/share/doc/$5/html install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/share/doc/$5/manual/html
install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/share/doc/$5/html/_static install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/share/doc/$5/manual/html/_static
install -m 644 doc/build/latex/*.pdf $rootdir/$prefix/share/doc/$5/ install -m 644 doc/build/latex/*.pdf $rootdir/$prefix/share/doc/$5/manual/
exit 0 exit 0
fi fi
pyver=`$python --version 2>&1 | perl -p -e 's|.* ([2-3])\..*|$1|'` pyver=`$python --version 2>&1 | perl -p -e 's|.* ([2-3])\..*|$1|'`
$python setup.py install --skip-build --root=$rootdir --prefix=$prefix $python setup.py install --skip-build --root=$rootdir --prefix=$prefix
rm -rf $rootdir/$sitelib/redfish/old rm -rf $rootdir/$sitelib/redfish/old $rootdir/$prefix/share/doc/$5/html $rootdir/$prefix/share/doc/$5/*.pdf
# Hardcoded for now to solve the delivery of the conf file still not correct with setup.py # Hardcoded for now to solve the delivery of the conf file still not correct with setup.py
mkdir -p $rootdir/etc mkdir -p $rootdir/etc

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.6.1
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 4

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.6.1
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 5

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.8.0
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 7

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.8.0
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 7

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.9.4
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 9

View File

@ -1,9 +0,0 @@
#
# $Id$
#
# Filter for old fedora build
#
# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
filter PBSUF = $pb->{'suf'}

View File

@ -1,9 +0,0 @@
#
# $Id$
#
# Filter for old fedora build
#
# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
filter PBSUF = $pb->{'suf'}

View File

@ -1,9 +0,0 @@
#
# $Id$
#
# Filter for old fedora build
#
# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
filter PBSUF = $pb->{'suf'}

View File

@ -1,9 +0,0 @@
#
# $Id$
#
# Filter for old fedora build
#
# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
filter PBSUF = $pb->{'suf'}

View File

@ -1,9 +0,0 @@
#
# $Id$
#
# Filter for old fedora build
#
# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
filter PBSUF = $pb->{'suf'}

View File

@ -1,9 +0,0 @@
#
# $Id$
#
# Filter for old fedora build
#
# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
filter PBSUF = $pb->{'suf'}

View File

@ -1,9 +0,0 @@
#
# $Id$
#
# Filter for old fedora build
#
# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
filter PBSUF = $pb->{'suf'}

View File

@ -24,3 +24,5 @@ filter PBSUF = %{dist}
# PBOBS is replaced by the Obsolete line # PBOBS is replaced by the Obsolete line
#filter PBOBS = #filter PBOBS =
filter PB2PYTHON2BDEP = texlive-multirow,texlive-upquote,texlive-wrapfig,texlive-threepartttble,texlive-titlesec
filter PB2PYTHON3BDEP = texlive-multirow,texlive-upquote,texlive-wrapfig,texlive-threepartttble,texlive-titlesec

View File

@ -6,3 +6,5 @@ filter PBGRP = Development/Python
# Cf: http://wiki.mandriva.com/en/Development/Packaging/Licenses # Cf: http://wiki.mandriva.com/en/Development/Packaging/Licenses
#filter PBLIC = GPL #filter PBLIC = GPL
filter PB2PYTHON2BDEP = python-pkg-resources >= 18, texlive-dist
filter PB2PYTHON3BDEP = python3-pkg-resources >= 18, texlive-dist

View File

@ -14,9 +14,9 @@ filter PBLIC = ASL 2.0
#filter PBDEP = #filter PBDEP =
# PBBDEP is replaced by the list of build dependencies # PBBDEP is replaced by the list of build dependencies
filter PBPYTHON2BDEP = python-devel,python-setuptools,python-sphinx >= 1.2.3,python-future >= 0.15.2 filter PBPYTHON2BDEP = python-devel,python-setuptools >= 18,python-sphinx >= 1.2.3,python-future >= 0.15.2,python-docopt >= 0.6.2,python-requests >= 2.9.1,python-simplejson >= 3.8.1,python-configparser >= 3.3.0,texlive,python-sphinx_rtd_theme
filter PBPYTHON2DEP = python-docopt >= 0.6.2,python-tortilla >= 0.4.1,python-jinja2 >= 2.7.3,python-simplejson >= 3.8.1,python-requests >= 2.9.1,python-configparser >= 3.3.0 filter PBPYTHON2DEP = python-docopt >= 0.6.2,python-tortilla >= 0.4.1,python-jinja2 >= 2.7.3,python-simplejson >= 3.8.1,python-requests >= 2.9.1,python-configparser >= 3.3.0
filter PBPYTHON3BDEP = python3-devel,python3-setuptools,python3-sphinx >= 1.2.3,python3-future >= 0.15.2 filter PBPYTHON3BDEP = python3-devel,python3-setuptools >= 18,python3-sphinx >= 1.2.3,python3-future >= 0.15.2,python3-docopt >= 0.6.2,python3-requests >= 2.9.1,python3-simplejson >= 3.8.1,texlive,python3-sphinx_rtd_theme
filter PBPYTHON3DEP = python3-docopt >= 0.6.2,python3-tortilla >= 0.4.1,python3-jinja2 >= 2.7.3,python3-simplejson >= 3.8.1,python3-requests >= 2.9.1 filter PBPYTHON3DEP = python3-docopt >= 0.6.2,python3-tortilla >= 0.4.1,python3-jinja2 >= 2.7.3,python3-simplejson >= 3.8.1,python3-requests >= 2.9.1
filter PBPYTHON3PKG = python3-redfish filter PBPYTHON3PKG = python3-redfish

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for ubuntu build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.6.2
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 4

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for ubuntu build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.6.2
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 4

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for ubuntu build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.6.2
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 4

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for ubuntu build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.7.3
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 4

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for ubuntu build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.7.3
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 4

View File

@ -1,11 +0,0 @@
#
# $Id$
#
# Filter for ubuntu build
#
# PBDEBSTD is replaced by the Debian standard version
filter PBDEBSTD = 3.8.0
# PBDEBCOMP is replaced by the Debian Compatibility value
filter PBDEBCOMP = 4

View File

@ -13,7 +13,7 @@ Url: PBURL
Source: PBREPO/PBSRC Source: PBREPO/PBSRC
Requires: PBPYTHON2DEP Requires: PBPYTHON2DEP
BuildArch: noarch BuildArch: noarch
BuildRequires: PBPYTHON2BDEP BuildRequires: PBPYTHON2BDEP, PB2PYTHON2BDEP
%description %description
PBDESC PBDESC
@ -21,12 +21,12 @@ Python2 version.
%package -n PBPYTHON3PKG %package -n PBPYTHON3PKG
Summary: %{summary} / Python 3 library Summary: %{summary} / Python 3 library
BuildRequires: PBPYTHON3BDEP BuildRequires: PBPYTHON3BDEP, PB2PYTHON3BDEP
Requires: PBPYTHON3DEP Requires: PBPYTHON3DEP
%package -n PBREALPKG-doc %package -n PBREALPKG-doc
Summary: %{summary} / Documentation Summary: %{summary} / Documentation
BuildRequires: PBPYTHON3BDEP BuildRequires: PBPYTHON3BDEP, PB2PYTHON3BDEP
Requires: PBPYTHON3DEP Requires: PBPYTHON3DEP
%description -n PBPYTHON3PKG %description -n PBPYTHON3PKG
@ -42,6 +42,8 @@ Documentation
# 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
PBPYTHON3FILTER PBPYTHON3FILTER
cp -a . %{py3dir} cp -a . %{py3dir}
# python3 doesn't provide configparser at all
(cd %{py3dir} ; perl -pi -e "s|configparser>=3.3.0||" requirements.txt)
%build %build
pushd %{py3dir} pushd %{py3dir}
@ -74,32 +76,31 @@ popd
%files %files
%doc README.rst examples/[a-z]*.py LICENSE %doc README.rst examples/[a-z]*.py LICENSE
%exclude %{_docdir}/PBREALPKG/html
%exclude %{_docdir}/PBREALPKG/*.pdf
%{_bindir}/redfish-client %{_bindir}/redfish-client
%dir %{_datadir}/redfish-client %dir %{_datadir}/redfish-client
%{_datadir}/redfish-client/templates/* %{_datadir}/redfish-client/templates/*
%config(noreplace) %{_sysconfdir}/redfish-client.conf %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}/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*
%{_mandir}/man1/*-py2.1* %{_mandir}/man1/*-py2.1*
%files -n PBPYTHON3PKG %files -n PBPYTHON3PKG
%doc README.rst examples/[a-z]*.py LICENSE %doc README.rst examples/[a-z]*.py LICENSE AUTHORS ChangeLog
%dir %{python3_sitelib}/redfish %dir %{python3_sitelib}/redfish
%{python3_sitelib}/redfish/*.py* %{python3_sitelib}/redfish/*.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*
%files -n PBREALPKG-doc %files -n PBREALPKG-doc
%{_docdir}/PBREALPKG/html/_static/* %{_docdir}/PBREALPKG/manual/html/_static/*
%{_docdir}/PBREALPKG/html/index.html %{_docdir}/PBREALPKG/manual/html/index.html
%{_docdir}/PBREALPKG/*.pdf %{_docdir}/PBREALPKG/manual/*.pdf
%changelog %changelog
PBLOG PBLOG