[ros-rosdep] 01/02: Convert package to pybuild

Jochen Sprickerhof jspricke at moszumanska.debian.org
Tue Jul 18 15:33:27 UTC 2017


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

jspricke pushed a commit to branch master
in repository ros-rosdep.

commit aba5a8963f6fc088cf4a32af94233d8a7629b317
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Sat Jul 15 08:56:57 2017 +0200

    Convert package to pybuild
    
    - Add python3-rosdep package
---
 debian/control                                     |  35 ++++--
 ...e-tests-due-to-missing-network-connection.patch | 129 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 debian/{manpages => python-rosdep.manpages}        |   0
 debian/rules                                       |  21 +---
 debian/source/options                              |   1 +
 6 files changed, 160 insertions(+), 27 deletions(-)

diff --git a/debian/control b/debian/control
index 36c87d5..e927889 100644
--- a/debian/control
+++ b/debian/control
@@ -1,22 +1,39 @@
 Source: ros-rosdep
-Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
-Uploaders: Leopold Palomo-Avellaneda <leo at alaxarxa.net>, Jochen Sprickerhof <jspricke at debian.org>
 Section: python
 Priority: optional
-Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 10), python-nose, dh-python
+Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Leopold Palomo-Avellaneda <leo at alaxarxa.net>, Jochen Sprickerhof <jspricke at debian.org>
+Build-Depends: debhelper (>= 10), dh-python, python-all, python-setuptools, python3-all, python3-setuptools, python-nose, python3-nose, python-rospkg, python-mock, python-yaml, python-catkin-pkg, python-rosdistro, python-dev, python3-rospkg, python3-mock, python3-yaml, python3-catkin-pkg, python3-rosdistro
 Standards-Version: 4.0.0
-Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/ros/ros-rosdep.git
-Vcs-Git: https://anonscm.debian.org/cgit/debian-science/packages/ros/ros-rosdep.git
 Homepage: http://wiki.ros.org/rosdep
-X-Python-Version: >= 2.7
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
+Vcs-Git: https://anonscm.debian.org/cgit/debian-science/packages/ros/ros-rosdep.git
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/ros/ros-rosdep.git
+Testsuite: autopkgtest-pkg-python
 
 Package: python-rosdep
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, python-catkin-pkg, python-yaml, python-rospkg, python-rosdistro
-Description: rosdep package manager abstraction tool for Robot OS
+Depends: ${python:Depends}, ${misc:Depends}
+Description: rosdep package manager abstraction tool for Robot OS (Python 2)
+ This package is part of Robot OS (ROS). It is a command-line tool for
+ installing system dependencies on a variety of platforms. For
+ *end-users*, rosdep helps you install system dependencies for
+ software that you are building from source. For *developers*, rosdep
+ simplifies the problem of installing system dependencies on different
+ platforms.
+ .
+ This package installs the library for Python 2.
+
+Package: python3-rosdep
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}
+Description: rosdep package manager abstraction tool for Robot OS (Python 3)
  This package is part of Robot OS (ROS). It is a command-line tool for
  installing system dependencies on a variety of platforms. For
  *end-users*, rosdep helps you install system dependencies for
  software that you are building from source. For *developers*, rosdep
  simplifies the problem of installing system dependencies on different
- platforms. 
+ platforms.
+ .
+ This package installs the library for Python 3.
diff --git a/debian/patches/0001-Disable-some-tests-due-to-missing-network-connection.patch b/debian/patches/0001-Disable-some-tests-due-to-missing-network-connection.patch
new file mode 100644
index 0000000..a90bb92
--- /dev/null
+++ b/debian/patches/0001-Disable-some-tests-due-to-missing-network-connection.patch
@@ -0,0 +1,129 @@
+From: Jochen Sprickerhof <git at jochen.sprickerhof.de>
+Date: Sat, 15 Jul 2017 09:03:32 +0200
+Subject: Disable some tests due to missing network connection in sbuild
+
+---
+ test/test_rosdep_gbpdistro_support.py | 3 +++
+ test/test_rosdep_rep3.py              | 2 ++
+ test/test_rosdep_source.py            | 2 ++
+ test/test_rosdep_sources_list.py      | 6 ++++++
+ 4 files changed, 13 insertions(+)
+
+diff --git a/test/test_rosdep_gbpdistro_support.py b/test/test_rosdep_gbpdistro_support.py
+index 824d6b9..9066f18 100644
+--- a/test/test_rosdep_gbpdistro_support.py
++++ b/test/test_rosdep_gbpdistro_support.py
+@@ -38,6 +38,7 @@ def get_test_dir():
+ 
+ 
+ def test_url_constants():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.gbpdistro_support import FUERTE_GBPDISTRO_URL
+     for url_name, url in [
+                           ('FUERTE_GBPDISTRO_URL', FUERTE_GBPDISTRO_URL)]:
+@@ -50,6 +51,7 @@ def test_url_constants():
+ 
+ 
+ def test_get_gbprepo_as_rosdep_data():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.rosdistrohelper import get_index
+     from rosdep2.gbpdistro_support import get_gbprepo_as_rosdep_data
+     distro = list(get_index().distributions.keys())[0]
+@@ -66,6 +68,7 @@ def test_get_gbprepo_as_rosdep_data():
+ 
+ 
+ def test_download_gbpdistro_as_rosdep_data():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.gbpdistro_support import download_gbpdistro_as_rosdep_data
+     from rosdep2.gbpdistro_support import FUERTE_GBPDISTRO_URL
+     from rosdep2.rep3 import REP3_TARGETS_URL
+diff --git a/test/test_rosdep_rep3.py b/test/test_rosdep_rep3.py
+index a12a398..df5d2bb 100644
+--- a/test/test_rosdep_rep3.py
++++ b/test/test_rosdep_rep3.py
+@@ -35,6 +35,7 @@ def get_test_dir():
+     return os.path.abspath(os.path.join(os.path.dirname(__file__), 'sources.list.d'))
+ 
+ def test_url_constants():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.rep3 import REP3_TARGETS_URL
+     for url_name, url in [('REP3_TARGETS_URL', REP3_TARGETS_URL),
+                           ]:
+@@ -46,6 +47,7 @@ def test_url_constants():
+             assert False, "URL [%s][%s] failed to download"%(url_name, url)
+ 
+ def test_download_targets_data():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.rep3 import download_targets_data, REP3_TARGETS_URL
+     from rosdep2 import DownloadFailure
+     data = download_targets_data(REP3_TARGETS_URL)
+diff --git a/test/test_rosdep_source.py b/test/test_rosdep_source.py
+index 24e63a2..db5cfa9 100644
+--- a/test/test_rosdep_source.py
++++ b/test/test_rosdep_source.py
+@@ -288,11 +288,13 @@ def test_download_rdmanifest():
+ 
+     
+ def test_install_from_file():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.platforms.source import install_from_file
+     f = os.path.join(get_test_dir(), 'noop-not-installed.rdmanifest')
+     install_from_file(f)
+ 
+ def test_install_source():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.platforms.source import install_source, SourceInstall
+     resolved = SourceInstall()
+     resolved.tarball = 'https://github.com/ros-infrastructure/rosdep/raw/master/test/source/foo.tar.gz'
+diff --git a/test/test_rosdep_sources_list.py b/test/test_rosdep_sources_list.py
+index 70da7ef..e614688 100644
+--- a/test/test_rosdep_sources_list.py
++++ b/test/test_rosdep_sources_list.py
+@@ -55,6 +55,7 @@ def test_parse_sources_data():
+     parse_sources_data
+ 
+ def test_url_constants():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.sources_list import DEFAULT_SOURCES_LIST_URL
+     for url_name, url in [('DEFAULT_SOURCES_LIST_URL', DEFAULT_SOURCES_LIST_URL)]:
+         try:
+@@ -65,6 +66,7 @@ def test_url_constants():
+             assert False, "URL [%s][%s] failed to download"%(url_name, url)
+ 
+ def test_download_default_sources_list():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.sources_list import download_default_sources_list
+     data = download_default_sources_list()
+     assert 'http' in data, data # sanity check, all sources files have urls
+@@ -188,6 +190,7 @@ def test_write_cache_file():
+         assert {'data': 1} == pickle.loads(f.read())
+     
+ def test_update_sources_list():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.sources_list import update_sources_list, InvalidData, compute_filename_hash, PICKLE_CACHE_EXT
+     try:
+         import cPickle as pickle
+@@ -238,6 +241,7 @@ def test_update_sources_list():
+     assert expected == index, "\n[%s]\nvs\n[%s]"%(expected, index)
+ 
+ def test_load_cached_sources_list():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.sources_list import load_cached_sources_list, update_sources_list
+     tempdir = tempfile.mkdtemp()
+ 
+@@ -287,6 +291,7 @@ def test_DataSourceMatcher():
+     assert not matcher.matches(data_source)
+ 
+ def test_download_rosdep_data():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.sources_list import download_rosdep_data
+     from rosdep2 import DownloadFailure
+     url = GITHUB_BASE_URL
+@@ -397,6 +402,7 @@ def test_DataSourceMatcher_create_default():
+     assert not matcher.matches(data_source)    
+     
+ def test_SourcesListLoader_create_default():
++    return  # disabled because sbuild doesn't allow network connections
+     from rosdep2.sources_list import update_sources_list, SourcesListLoader, DataSourceMatcher
+     # create temp dir for holding sources cache
+     tempdir = tempfile.mkdtemp()
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..543049d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Disable-some-tests-due-to-missing-network-connection.patch
diff --git a/debian/manpages b/debian/python-rosdep.manpages
similarity index 100%
rename from debian/manpages
rename to debian/python-rosdep.manpages
diff --git a/debian/rules b/debian/rules
index 4dd8630..62eb807 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,22 +1,7 @@
 #!/usr/bin/make -f
 
-# This file was automatically generated by stdeb 0.6.0+git at
-# Mon, 01 Dec 2014 09:55:58 +0100
+export PYBUILD_NAME=rosdep
+export PYBUILD_AFTER_INSTALL=rm -rf 'debian/python3-rosdep/usr/bin'
 
 %:
-	dh $@ --with python2 --buildsystem=python_distutils
-
-
-override_dh_clean:
-	rm -rf src/rosdep.egg-info
-	rm -rf build
-	rm -rf src/rosdep2/*.pyc
-	rm -rf src/rosdep2/platforms/*.pyc
-	rm -rf test/*.pyc
-	rm -rf nosetests.xml
-	rm -rf .coverage
-	rm -rf nose-1.3.*
-	dh_clean
-
-get-orig-source:
-	uscan --verbose --force-download --repack --compress xz
+	dh $@ --with python2,python3 --buildsystem=pybuild
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..cb61fa5
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1 @@
+extend-diff-ignore = "^[^/]*[.]egg-info/"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-rosdep.git



More information about the debian-science-commits mailing list