Fixed Py3.

This commit is contained in:
Thomas Goirand
2015-06-18 13:30:38 +00:00
parent 5c1270d172
commit a5747fb15f
9 changed files with 77 additions and 8 deletions

6
debian/control vendored
View File

@@ -37,7 +37,6 @@ Build-Depends-Indep: python-coverage,
python3-oslo.i18n (>= 1.5.0),
python3-oslo.serialization (>= 1.4.0),
python3-oslo.utils (>= 1.4.0),
python3-oslosphinx (>= 2.5.0),
python3-prettytable,
python3-requests,
python3-six (>= 1.9.0),
@@ -94,7 +93,7 @@ Depends: python3-iso8601,
python3-six (>= 1.9.0),
python3-stevedore (>= 1.3.0),
${misc:Depends},
${python:Depends},
${python3:Depends},
Suggests: python-ceilometerclient-doc
Description: Client library for Openstack Ceilometer API server - Python 3.x
Ceilometer aims to deliver a unique point of contact for billing systems to
@@ -110,7 +109,8 @@ Description: Client library for Openstack Ceilometer API server - Python 3.x
.
This package contains the Python 3.x module.
Package: python3-ceilometerclient
Package: python-ceilometerclient-doc
Section: doc
Architecture: all
Depends: ${misc:Depends},
${sphinxdoc:Depends},

View File

@@ -1,9 +1,9 @@
Document: pythonceilometerclient-doc
Document: python-ceilometerclient-doc
Title: Python Ceilometer Client Documentation
Author: OpenStack Foundation
Abstract: Sphinx documentation for Python Ceilometer Client
Section: Programming/Python
Format: HTML
Index: /usr/share/doc/python-ceilometerclient/html/index.html
Files: /usr/share/doc/python-ceilometerclient/html/*
Index: /usr/share/doc/python-ceilometerclient-doc/html/index.html
Files: /usr/share/doc/python-ceilometerclient-doc/html/*

11
debian/python-ceilometerclient.postinst vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "configure" ] ; then
update-alternatives --install /usr/bin/ceilometer ceilometer /usr/bin/python2-ceilometer 300
fi
#DEBHELPER#
exit 0

11
debian/python-ceilometerclient.postrm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
update-alternatives --remove ceilometer /usr/bin/python2-ceilometer
fi
#DEBHELPER#
exit 0

11
debian/python-ceilometerclient.prerm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] ; then
update-alternatives --remove ceilometer /usr/bin/python2-ceilometer
fi
#DEBHELPER#
exit 0

View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "configure" ] ; then
update-alternatives --install /usr/bin/ceilometer ceilometer /usr/bin/python3-ceilometer 200
fi
#DEBHELPER#
exit 0

11
debian/python3-ceilometerclient.postrm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
update-alternatives --remove ceilometer /usr/bin/python3-ceilometer
fi
#DEBHELPER#
exit 0

11
debian/python3-ceilometerclient.prerm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] ; then
update-alternatives --remove ceilometer /usr/bin/python3-ceilometer
fi
#DEBHELPER#
exit 0

7
debian/rules vendored
View File

@@ -16,21 +16,24 @@ override_dh_install:
set -e ; for pyvers in $(PYTHONS); do \
python$$pyvers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python-ceilometerclient; \
done
set -e ; for pyvers in $(PYTHON3S); do \
python$$pyvers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python3-ceilometerclient; \
done
mv $(CURDIR)/debian/python-ceilometerclient/usr/bin/ceilometer $(CURDIR)/debian/python-ceilometerclient/usr/bin/python2-ceilometer
mv $(CURDIR)/debian/python3-ceilometerclient/usr/bin/ceilometer $(CURDIR)/debian/python3-ceilometerclient/usr/bin/python3-ceilometer
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
@echo "===> Running tests"
set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \
set -e ; set -x ; for i in 2.7 3.4 ; do \
PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
rm -rf .testrepository ; \
testr-python$$PYMAJOR init ; \
TEMP_REZ=`mktemp -t` ; \
PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit 'oslo_utils.*' | tee $$TEMP_REZ | subunit2pyunit ; \
PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \
cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
rm -f $$TEMP_REZ ; \
testr-python$$PYMAJOR slowest ; \