From: František Dvořák Date: Wed, 26 Aug 2015 21:16:32 +0000 (+0200) Subject: Update and cleanups. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=208b5ac89920643c56faa0d95c6b3abd684f2a83;p=packaging-deb-pOCCI.git Update and cleanups. --- diff --git a/debian/changelog b/debian/changelog index 1968a62..05c39c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-pocci (0.0.1-0~20150826gitd61185f) stable; urgency=low +python-pocci (0.0.1-0~20150826gitd2a380e) stable; urgency=low * Initial package -- FrantiÅ¡ek Dvořák Wed, 26 Aug 2015 13:00:24 +0200 diff --git a/debian/pOCCI-3.1 b/debian/pOCCI-3.1 deleted file mode 100644 index 4f2aa2b..0000000 --- a/debian/pOCCI-3.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/pOCCI.1 diff --git a/debian/patches/2to3-tests.patch b/debian/patches/2to3-tests.patch new file mode 100644 index 0000000..fa2baa3 --- /dev/null +++ b/debian/patches/2to3-tests.patch @@ -0,0 +1,15 @@ +Convert the tests together with the sources. + +Index: packaging-deb-pOCCI/setup.py +=================================================================== +--- packaging-deb-pOCCI.orig/setup.py ++++ packaging-deb-pOCCI/setup.py +@@ -50,7 +50,7 @@ setup( + + keywords='OCCI cloud compliance testing pycurl', + +- packages=find_packages(exclude=['doc', 'tests']), ++ packages=find_packages(exclude=['doc']), + + install_requires=['pycurl'], + diff --git a/debian/patches/2to3.patch b/debian/patches/2to3.patch deleted file mode 100644 index 92565c1..0000000 --- a/debian/patches/2to3.patch +++ /dev/null @@ -1,16 +0,0 @@ -Enable Python 2 to Pyhton 3 conversion. - -It is not enabled in upstream as there are problems in setuptools with -launching tests. - -Index: packaging-deb-pOCCI/setup.py -=================================================================== ---- packaging-deb-pOCCI.orig/setup.py -+++ packaging-deb-pOCCI/setup.py -@@ -68,4 +68,6 @@ setup( - }, - - test_suite='tests', -+ -+ use_2to3=True, - ) diff --git a/debian/patches/series b/debian/patches/series index 09e6fe0..09b1d6b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ -un-numpy.patch -2to3.patch +2to3-tests.patch diff --git a/debian/patches/un-numpy.patch b/debian/patches/un-numpy.patch deleted file mode 100644 index afb466d..0000000 --- a/debian/patches/un-numpy.patch +++ /dev/null @@ -1,14 +0,0 @@ -Numpydoc is not used in upstream. - -Index: packaging-deb-pOCCI/doc/conf.py -=================================================================== ---- packaging-deb-pOCCI.orig/doc/conf.py -+++ packaging-deb-pOCCI/doc/conf.py -@@ -19,7 +19,6 @@ extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.viewcode', -- 'numpydoc', - ] - - # To suppress autodoc errors. diff --git a/debian/python-pocci.pyremove b/debian/python-pocci.pyremove new file mode 100644 index 0000000..0cbea2d --- /dev/null +++ b/debian/python-pocci.pyremove @@ -0,0 +1,3 @@ +pOCCI/pOCCI.1 +pOCCI/pOCCI.cfg +tests diff --git a/debian/python3-pocci.manpages b/debian/python3-pocci.manpages index ab977f8..673e00f 100644 --- a/debian/python3-pocci.manpages +++ b/debian/python3-pocci.manpages @@ -1 +1 @@ -debian/pOCCI-3.1 +debian/pOCCI*.1 diff --git a/debian/python3-pocci.pyremove b/debian/python3-pocci.pyremove new file mode 100644 index 0000000..0cbea2d --- /dev/null +++ b/debian/python3-pocci.pyremove @@ -0,0 +1,3 @@ +pOCCI/pOCCI.1 +pOCCI/pOCCI.cfg +tests diff --git a/debian/rules b/debian/rules index 812bcdc..bf6fd43 100755 --- a/debian/rules +++ b/debian/rules @@ -4,6 +4,9 @@ export PYBUILD_NAME = pocci export PYBUILD_DISABLE=test/python3 +PY2VER := $(shell pyversions -vds) +PY3VER := $(shell py3versions -vds) + %: dh $@ --with python2,python3 --buildsystem=pybuild @@ -19,22 +22,18 @@ override_dh_auto_build: override_dh_auto_install: dh_auto_install # binaries for both Python 2 and Python 3 - mv debian/python3-pocci/usr/bin/pOCCI debian/python3-pocci/usr/bin/pOCCI-3 + cp -p debian/python-pocci/usr/bin/pOCCI debian/python-pocci/usr/bin/pOCCI-$(PY2VER) + mkdir -p debian/python-pocci/usr/share/man/man1 + cp -p pOCCI/pOCCI.1 debian/python-pocci/usr/share/man/man1/pOCCI-$(PY2VER).1 + mv debian/python3-pocci/usr/bin/pOCCI debian/python3-pocci/usr/bin/pOCCI-$(PY3VER) + mkdir -p debian/python3-pocci/usr/share/man/man1 + cp -p pOCCI/pOCCI.1 debian/python3-pocci/usr/share/man/man1/pOCCI-$(PY3VER).1 # config file not needed rm -rf debian/python-pocci/etc rm -rf debian/python3-pocci/etc - # remove files already moved - rm -f debian/python-pocci/usr/lib/python*/dist-packages/pOCCI/pOCCI.1 - rm -f debian/python-pocci/usr/lib/python*/dist-packages/pOCCI/pOCCI.cfg override_dh_auto_test: dh_auto_test - # troubles with setup tools and 2to3, - # convert and run tests for Python 3 manually - rm -rf build/lib/tests/ - mkdir -p build/lib/ - cp -a tests/ build/lib/tests - 2to3 -w -n build/lib/tests/*.py - chmod +x build/lib/tests/test_*.py - (export PYTHONPATH=build/lib:$$PYTHONPATH;\ - for t in build/lib/tests/test_*.py; do $${t}; done) + (cd .pybuild/pythonX.Y_$(PY3VER)/build/tests;\ + export PYTHONPATH=..:$$PYTHONPATH;\ + for t in test_*.py; do python$(PY3VER) $${t}; done) diff --git a/debian/watch b/debian/watch index d0f2539..e4a3c37 100644 --- a/debian/watch +++ b/debian/watch @@ -2,5 +2,3 @@ version=3 #opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/pOCCI-$1\.tar\.gz/ \ # https://github.com/CESNET/pOCCI/tags .*/v?(\d\S*)\.tar\.gz - -https://github.com/CESNET/pOCCI/archive/d61185f1ed58d8bfb8606be256936483d110b78a/pOCCI-d61185f1ed58d8bfb8606be256936483d110b78a.tar.gz