[pyresample] 11/16: New package for Python 3

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Sat Jul 11 19:52:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

a_valentino-guest pushed a commit to branch master
in repository pyresample.

commit 7081ebbafb35a30e82c9036099315d6eecdba750
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Sat Jul 11 15:35:01 2015 +0000

    New package for Python 3
---
 debian/changelog                      |  2 ++
 debian/control                        | 35 +++++++++++++++++++++++++++++++++--
 debian/python-pyresample-test.install |  2 +-
 debian/python-pyresample.install      |  1 -
 debian/rules                          | 22 +++++-----------------
 debian/tests/control                  |  3 +++
 debian/tests/python3                  | 12 ++++++++++++
 7 files changed, 56 insertions(+), 21 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9773446..c773157 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ pyresample (1.1.3-1) UNRELEASED; urgency=medium
     - fix Vcs-Browser field format
   * debian/ruels
     - fix test invocation
+  * New package for Python 3
+  * Switch to pybuild build system
 
  -- Antonio Valentino <antonio.valentino at tiscali.it>  Sun, 03 Aug 2014 07:21:08 +0000
 
diff --git a/debian/control b/debian/control
index 9301df8..8fd2212 100644
--- a/debian/control
+++ b/debian/control
@@ -4,16 +4,24 @@ Uploaders: Antonio Valentino <antonio.valentino at tiscali.it>
 Section: python
 Testsuite: autopkgtest
 Priority: optional
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 Build-Depends: debhelper (>= 9.0.0),
                dh-python,
                python-all,
+               python3-all,
                python-setuptools,
+               python3-setuptools,
                python-numpy,
+               python3-numpy,
                python-pykdtree,
                python-pyproj,
+               python3-pyproj,
                python-configobj,
+               python3-configobj,
                python-sphinx,
                python-nose,
+               python3-nose,
                python-mpltoolkits.basemap
 Standards-Version: 3.9.6
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/pyresample.git
@@ -27,11 +35,11 @@ Depends: ${misc:Depends},
          python-configobj,
          python-numpy,
          python-pyproj,
-         python-scipy | python-pykdtree
+         python-pykdtree | python-scipy
 Recommends: python-numexpr,
             python-mpltoolkits.basemap
 Suggests: python-pyresample-doc
-Description: Resampling of remote sensing data in Python
+Description: Resampling of remote sensing data in Python 2
  Pyresample is a Python package for resampling (reprojection) of earth
  observing satellite data. It handles both resampling of gridded data
  (e.g. geostationary satellites) and swath data (polar orbiting
@@ -39,6 +47,29 @@ Description: Resampling of remote sensing data in Python
  .
  Pyresample can use multiple processor cores for resampling.
  Pyresample supports masked arrays.
+ .
+ This is the Python 2 version of the package.
+
+Package: python3-pyresample
+Architecture: all
+Depends: ${misc:Depends},
+         ${python3:Depends},
+         python3-configobj,
+         python3-numpy,
+         python3-pyproj,
+         python3-scipy
+Recommends: python3-numexpr
+Suggests: python-pyresample-doc
+Description: Resampling of remote sensing data in Python 3
+ Pyresample is a Python package for resampling (reprojection) of earth
+ observing satellite data. It handles both resampling of gridded data
+ (e.g. geostationary satellites) and swath data (polar orbiting
+ satellites).
+ .
+ Pyresample can use multiple processor cores for resampling.
+ Pyresample supports masked arrays.
+ .
+ This is the Python 3 version of the package.
 
 Package: python-pyresample-doc
 Architecture: all
diff --git a/debian/python-pyresample-test.install b/debian/python-pyresample-test.install
index ea6b395..d3a1191 100644
--- a/debian/python-pyresample-test.install
+++ b/debian/python-pyresample-test.install
@@ -1,2 +1,2 @@
-test/* usr/share/python-pyresample-test
+pyresample/test/* usr/share/python-pyresample-test
 
diff --git a/debian/python-pyresample.install b/debian/python-pyresample.install
deleted file mode 100644
index c06f455..0000000
--- a/debian/python-pyresample.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python2.7/dist-packages/pyresample* usr/lib/python2.7/dist-packages
diff --git a/debian/rules b/debian/rules
index 0403882..d3c2091 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,32 +2,20 @@
 # -*- makefile -*-
 
 # Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-PY2VERS = $(shell pyversions -r -v)
+export DH_VERBOSE=1
+export PYBUILD_NAME=pyresample
 
 
 %:
-	dh $@ --with python2,sphinxdoc --buildsystem=python_distutils
+	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
 
 
 override_dh_auto_build:
-	dh_auto_build --buildsystem=python_distutils
+	dh_auto_build --buildsystem=pybuild
 	$(MAKE) -C docs html
 
 
-override_dh_auto_test:
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	set -e -x; \
-	for py in $(PY2VERS); do \
-		cd $(CURDIR)/build/lib.*-$$py; \
-		env PYTHONPATH=. python$$py /usr/bin/nosetests -v -w $(CURDIR)/pyresample/test; \
-	done
-endif
-
-
 override_dh_auto_clean:
-	dh_auto_clean --buildsystem=python_distutils
+	dh_auto_clean --buildsystem=pybuild
 	$(MAKE) -C docs clean
 	$(RM) -r build
-
diff --git a/debian/tests/control b/debian/tests/control
index 826a8c3..3fc6f51 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: python2
 Depends: @builddeps@, python-pyresample, python-pyresample-test, python-all
+
+Tests: python3
+Depends: @builddeps@, python3-pyresample, python-pyresample-test, python3-all
diff --git a/debian/tests/python3 b/debian/tests/python3
new file mode 100755
index 0000000..0743fbe
--- /dev/null
+++ b/debian/tests/python3
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -efu
+
+PYS=${PYS:-"$(py3versions -r 2>/dev/null)"}
+TESTPKG=${TESTPKG:-pyresample}
+
+cd "$ADTTMP"
+
+for py in $PYS; do
+    echo "=== $py ==="
+    $py -m unittest discover -v /usr/share/python-pyresample-test 2>&1
+done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pyresample.git



More information about the Pkg-grass-devel mailing list