* Added Python3 support.
* Swiched to using testr directly when running tests.
This commit is contained in:
5
debian/changelog
vendored
5
debian/changelog
vendored
@@ -1,5 +1,6 @@
|
||||
python-cinderclient (1:1.2.2-1) UNRELEASED; urgency=medium
|
||||
|
||||
[ Corey Bryant ]
|
||||
* New upstream release.
|
||||
- d/control: Align requirements with upstream.
|
||||
- d/gbp.conf: Update gbp configuration for liberty branch.
|
||||
@@ -7,6 +8,10 @@ python-cinderclient (1:1.2.2-1) UNRELEASED; urgency=medium
|
||||
- d/tests/*: Add DEP 8 tests from Ubuntu.
|
||||
- d/rules: Fail the build if tests fail.
|
||||
|
||||
[ Thomas Goirand ]
|
||||
* Added Python3 support.
|
||||
* Swiched to using testr directly when running tests.
|
||||
|
||||
-- Corey Bryant <corey.bryant@canonical.com> Mon, 08 Jun 2015 10:40:39 -0400
|
||||
|
||||
python-cinderclient (1:1.1.1-2) unstable; urgency=medium
|
||||
|
||||
51
debian/control
vendored
51
debian/control
vendored
@@ -2,7 +2,7 @@ Source: python-cinderclient
|
||||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
|
||||
Uploaders: Thomas Goirand <zigo@debian.org>
|
||||
Uploaders: Thomas Goirand <zigo@debian.org>,
|
||||
Build-Depends: debhelper (>= 9),
|
||||
dh-python,
|
||||
openstack-pkg-tools,
|
||||
@@ -10,6 +10,9 @@ Build-Depends: debhelper (>= 9),
|
||||
python-pbr,
|
||||
python-setuptools,
|
||||
python-sphinx,
|
||||
python3-all,
|
||||
python3-pbr,
|
||||
python3-setuptools,
|
||||
Build-Depends-Indep: python-babel,
|
||||
python-coverage,
|
||||
python-fixtures,
|
||||
@@ -22,9 +25,21 @@ Build-Depends-Indep: python-babel,
|
||||
python-requests-mock (>= 0.6.0),
|
||||
python-simplejson,
|
||||
python-six (>= 1.9.0),
|
||||
python-testtools,
|
||||
python-tempest-lib (>= 0.5.0),
|
||||
python-testtools,
|
||||
python-unittest2,
|
||||
python3-babel,
|
||||
python3-fixtures,
|
||||
python3-keystoneclient (>= 1:1.6.0),
|
||||
python3-mock,
|
||||
python3-prettytable,
|
||||
python3-requests (>= 2.5.2),
|
||||
python3-requests-mock (>= 0.6.0),
|
||||
python3-simplejson,
|
||||
python3-six (>= 1.9.0),
|
||||
python3-subunit,
|
||||
python3-tempest-lib (>= 0.5.0),
|
||||
python3-testtools,
|
||||
subunit,
|
||||
testrepository,
|
||||
Standards-Version: 3.9.6
|
||||
@@ -35,7 +50,6 @@ XS-Testsuite: autopkgtest
|
||||
|
||||
Package: python-cinderclient
|
||||
Architecture: all
|
||||
Pre-Depends: dpkg (>= 1.15.6~)
|
||||
Depends: python-babel,
|
||||
python-keystoneclient (>= 1:1.6.0),
|
||||
python-pbr,
|
||||
@@ -45,8 +59,8 @@ Depends: python-babel,
|
||||
python-six (>= 1.9.0),
|
||||
${misc:Depends},
|
||||
${python:Depends},
|
||||
Provides: ${python:Provides}
|
||||
Description: Python bindings to the OpenStack Volume API
|
||||
Provides: ${python:Provides},
|
||||
Description: Python bindings to the OpenStack Volume API - Python 2.x
|
||||
Cinder is a block storage as service system for the Openstack cloud computing
|
||||
software suite. It is a direct replacement for nova-volume as a separate
|
||||
project. Cinder users LVM partitions of your volume servers in order to
|
||||
@@ -56,3 +70,30 @@ Description: Python bindings to the OpenStack Volume API
|
||||
This package contains the a client for the OpenStack Volume API. There's a
|
||||
Python API (the "cinderclient" module), and a command-line script ("cinder").
|
||||
Each implements 100% of the OpenStack Volume API.
|
||||
.
|
||||
This package provides the Python 2.x module.
|
||||
|
||||
Package: python3-cinderclient
|
||||
Architecture: all
|
||||
Depends: python3-babel,
|
||||
python3-keystoneclient (>= 1:1.6.0),
|
||||
python3-pbr,
|
||||
python3-prettytable,
|
||||
python3-requests (>= 2.5.2),
|
||||
python3-simplejson,
|
||||
python3-six (>= 1.9.0),
|
||||
${misc:Depends},
|
||||
${python3:Depends},
|
||||
Provides: ${python:Provides},
|
||||
Description: Python bindings to the OpenStack Volume API - Python 3.x
|
||||
Cinder is a block storage as service system for the Openstack cloud computing
|
||||
software suite. It is a direct replacement for nova-volume as a separate
|
||||
project. Cinder users LVM partitions of your volume servers in order to
|
||||
provide iSCSI permanent block storage devices for your virtual machines
|
||||
running on Nova.
|
||||
.
|
||||
This package contains the a client for the OpenStack Volume API. There's a
|
||||
Python API (the "cinderclient" module), and a command-line script ("cinder").
|
||||
Each implements 100% of the OpenStack Volume API.
|
||||
.
|
||||
This package provides the Python 3.x module.
|
||||
|
||||
2
debian/gbp.conf
vendored
2
debian/gbp.conf
vendored
@@ -4,6 +4,6 @@ debian-branch = debian/liberty
|
||||
upstream-tag = %(version)s
|
||||
compression = xz
|
||||
|
||||
[git-buildpackage]
|
||||
[buildpackage]
|
||||
export-dir = ../build-area/
|
||||
cleaner = true
|
||||
|
||||
11
debian/python-cinderclient.postinst
vendored
Normal file
11
debian/python-cinderclient.postinst
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "configure" ] ; then
|
||||
update-alternatives --install /usr/bin/cinder cinder /usr/bin/python2-cinder 300
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
11
debian/python-cinderclient.postrm
vendored
Normal file
11
debian/python-cinderclient.postrm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
|
||||
update-alternatives --remove cinder /usr/bin/python2-cinder
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
11
debian/python-cinderclient.prerm
vendored
Normal file
11
debian/python-cinderclient.prerm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "remove" ] ; then
|
||||
update-alternatives --remove cinder /usr/bin/python2-cinder
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
11
debian/python3-cinderclient.postinst
vendored
Normal file
11
debian/python3-cinderclient.postinst
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "configure" ] ; then
|
||||
update-alternatives --install /usr/bin/cinder cinder /usr/bin/python3-cinder 200
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
11
debian/python3-cinderclient.postrm
vendored
Normal file
11
debian/python3-cinderclient.postrm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
|
||||
update-alternatives --remove cinder /usr/bin/python3-cinder
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
11
debian/python3-cinderclient.prerm
vendored
Normal file
11
debian/python3-cinderclient.prerm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "remove" ] ; then
|
||||
update-alternatives --remove cinder /usr/bin/python3-cinder
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
42
debian/rules
vendored
42
debian/rules
vendored
@@ -1,33 +1,51 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
#export DH_VERBOSE=1
|
||||
PYTHONS:=$(shell pyversions -vr)
|
||||
PYTHON3S:=$(shell py3versions -vr)
|
||||
|
||||
include /usr/share/openstack-pkg-tools/pkgos.make
|
||||
|
||||
export OSLO_PACKAGE_VERSION=$(VERSION)
|
||||
|
||||
%:
|
||||
dh $@ --with python2,python3
|
||||
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean
|
||||
rm -f cinderclient/versioninfo
|
||||
rm -rf setuptools_git-*.egg
|
||||
rm -rf build
|
||||
|
||||
override_dh_auto_configure:
|
||||
echo $(VERSION) > cinderclient/versioninfo
|
||||
dh_auto_configure
|
||||
override_dh_auto_install:
|
||||
set -e ; for pyvers in $(PYTHONS); do \
|
||||
python$$pyvers setup.py install --install-layout=deb \
|
||||
--root $(CURDIR)/debian/python-cinderclient; \
|
||||
done
|
||||
set -e ; for pyvers in $(PYTHON3S); do \
|
||||
python$$pyvers setup.py install --install-layout=deb \
|
||||
--root $(CURDIR)/debian/python3-cinderclient; \
|
||||
done
|
||||
rm -f $(CURDIR)/debian/python*/usr/lib/python*/dist-packages/*.pth
|
||||
mv $(CURDIR)/debian/python-cinderclient/usr/bin/cinder $(CURDIR)/debian/python-cinderclient/usr/bin/python2-cinder
|
||||
mv $(CURDIR)/debian/python3-cinderclient/usr/bin/cinder $(CURDIR)/debian/python3-cinderclient/usr/bin/python3-cinder
|
||||
|
||||
override_dh_install:
|
||||
dh_install
|
||||
install -D -m 0644 tools/cinder.bash_completion $(CURDIR)/debian/python-cinderclient/etc/bash_completion.d/cinder.bash_completion
|
||||
|
||||
%:
|
||||
dh $@ --with python2
|
||||
|
||||
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
|
||||
override_dh_auto_test:
|
||||
./run_tests.sh -P -N
|
||||
#python setup.py testr --slowest --testr-args='--subunit '
|
||||
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
|
||||
@echo "===> Running tests"
|
||||
set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; 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 | tee $$TEMP_REZ | subunit2pyunit ; \
|
||||
cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
|
||||
rm -f $$TEMP_REZ ; \
|
||||
testr-python$$PYMAJOR slowest ; \
|
||||
done
|
||||
endif
|
||||
|
||||
# Commands not to run
|
||||
|
||||
Reference in New Issue
Block a user