[Python-modules-commits] [python-dmidecode] 01/07: use the correct build directory to run tests, this fixes a FTBFS on non-linux archs; Closes: #808363

Sandro Tosi morph at moszumanska.debian.org
Sun Jan 8 17:39:14 UTC 2017


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

morph pushed a commit to branch master
in repository python-dmidecode.

commit 490616f5b74268c609ef31f4a3e833250f28ca94
Author: Sandro Tosi <morph at debian.org>
Date:   Sun Jan 8 12:32:21 2017 -0500

    use the correct build directory to run tests, this fixes a FTBFS on non-linux archs; Closes: #808363
---
 debian/changelog                                    |  8 +++++++-
 debian/patches/series                               |  1 +
 debian/patches/tests_inject_correct_build_dir.patch | 17 +++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 80d00b3..4e6d4aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,14 @@
 python-dmidecode (3.12.2-3) UNRELEASED; urgency=medium
 
+  [ Sandro Tosi ]
+  * debian/patches/tests_inject_correct_build_dir.patch
+    - use the correct build directory to run tests, this fixes a FTBFS on
+      non-linux archs; Closes: #808363
+
+  [ Ondřej Nový ]
   * Fixed VCS URL (https)
 
- -- Ondřej Nový <novy at ondrej.org>  Tue, 29 Mar 2016 22:01:11 +0200
+ -- Sandro Tosi <morph at debian.org>  Sun, 08 Jan 2017 12:24:13 -0500
 
 python-dmidecode (3.12.2-2) unstable; urgency=medium
 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..593c060
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+tests_inject_correct_build_dir.patch
diff --git a/debian/patches/tests_inject_correct_build_dir.patch b/debian/patches/tests_inject_correct_build_dir.patch
new file mode 100644
index 0000000..bdaa1d2
--- /dev/null
+++ b/debian/patches/tests_inject_correct_build_dir.patch
@@ -0,0 +1,17 @@
+--- a/unit-tests/unit
++++ b/unit-tests/unit
+@@ -8,9 +8,11 @@ if sys.version_info[0] < 3:
+ from getopt import getopt
+ 
+ # Setup temporary sys.path() with our build dir
+-(sysname, nodename, release, version, machine) = os.uname()
+-pyver = sys.version[:3]
+-sys.path.insert(0,'../build/lib.%s-%s-%s' % (sysname.lower(), machine, pyver))
++from distutils.command.build import build
++from distutils.core import Distribution
++b = build(Distribution())
++b.finalize_options()
++sys.path.insert(0, '../'+b.build_platlib)
+ 
+ root_user = (os.getuid() == 0 and True or False)
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-dmidecode.git



More information about the Python-modules-commits mailing list