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/
.installed.cfg
*.egg
AUTHORS
ChangeLog
# PyInstaller
# Usually these files are written by a python script from a template
@ -57,9 +59,12 @@ docs/_build/
# PyBuilder
target/
# Project-Builder.org
delivery/
build/
# Project-Builder.org 0.14.1
pbdelivery/
pbbuild/
# ctags
tags
# Pydev
.project

View File

@ -4,7 +4,7 @@ FAQ
- 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::
pip install --upgrade setuptools

View File

@ -11,17 +11,17 @@ export pkg=$5
# Documentation installation only
if [ $python = "doc" ]; then
install -d 755 $rootdir/$prefix/share/doc/$5/html/_static
install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/share/doc/$5/html
install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/share/doc/$5/html/_static
install -m 644 doc/build/latex/*.pdf $rootdir/$prefix/share/doc/$5/
install -d 755 $rootdir/$prefix/share/doc/$5/manual/html/_static
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/manual/html/_static
install -m 644 doc/build/latex/*.pdf $rootdir/$prefix/share/doc/$5/manual/
exit 0
fi
pyver=`$python --version 2>&1 | perl -p -e 's|.* ([2-3])\..*|$1|'`
$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
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
#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
#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 =
# 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 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 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
Requires: PBPYTHON2DEP
BuildArch: noarch
BuildRequires: PBPYTHON2BDEP
BuildRequires: PBPYTHON2BDEP, PB2PYTHON2BDEP
%description
PBDESC
@ -21,12 +21,12 @@ Python2 version.
%package -n PBPYTHON3PKG
Summary: %{summary} / Python 3 library
BuildRequires: PBPYTHON3BDEP
BuildRequires: PBPYTHON3BDEP, PB2PYTHON3BDEP
Requires: PBPYTHON3DEP
%package -n PBREALPKG-doc
Summary: %{summary} / Documentation
BuildRequires: PBPYTHON3BDEP
BuildRequires: PBPYTHON3BDEP, PB2PYTHON3BDEP
Requires: PBPYTHON3DEP
%description -n PBPYTHON3PKG
@ -42,6 +42,8 @@ Documentation
# Fix for now as long as setuptools isn't more recent in distributions
PBPYTHON3FILTER
cp -a . %{py3dir}
# python3 doesn't provide configparser at all
(cd %{py3dir} ; perl -pi -e "s|configparser>=3.3.0||" requirements.txt)
%build
pushd %{py3dir}
@ -74,32 +76,31 @@ popd
%files
%doc README.rst examples/[a-z]*.py LICENSE
%exclude %{_docdir}/PBREALPKG/html
%exclude %{_docdir}/PBREALPKG/*.pdf
%{_bindir}/redfish-client
%dir %{_datadir}/redfish-client
%{_datadir}/redfish-client/templates/*
%config(noreplace) %{_sysconfdir}/redfish-client.conf
%dir %{python_sitelib}/redfish
%{python_sitelib}/redfish/*.py*
#%{python_sitelib}/redfish/tests/*.py*
%{python_sitelib}/python_redfish*
# Needs improvement to host all .1 man pages but not the py3 ones
%{_mandir}/man1/PBREALPKG.1*
%{_mandir}/man1/*-py2.1*
%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
%{python3_sitelib}/redfish/*.py*
%{python3_sitelib}/redfish/__pycache__/*.py*
#%{python3_sitelib}/redfish/tests/*.py*
#%{python3_sitelib}/redfish/tests/__pycache__/*.py*
%{python3_sitelib}/python_redfish*
%{_mandir}/man1/*-py3.1*
%files -n PBREALPKG-doc
%{_docdir}/PBREALPKG/html/_static/*
%{_docdir}/PBREALPKG/html/index.html
%{_docdir}/PBREALPKG/*.pdf
%{_docdir}/PBREALPKG/manual/html/_static/*
%{_docdir}/PBREALPKG/manual/html/index.html
%{_docdir}/PBREALPKG/manual/*.pdf
%changelog
PBLOG