[bug#33762] gnu: python-pyelftools: Fix tests with python 3.7.

Message ID 87zht6qviq.fsf@ponder.i-did-not-set--mail-host-address--so-tickle-me
State Accepted
Headers show
Series [bug#33762] gnu: python-pyelftools: Fix tests with python 3.7. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Vagrant Cascadian Dec. 15, 2018, 10:23 p.m. UTC
* gnu/packages/python.scm (python-pyelftools)
  [native-inputs]: Remove python-setuptools.
  [arguments]: Add set-pythonpath phase.
---
 gnu/packages/python.scm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

Comments

Efraim Flashner Dec. 16, 2018, 9:56 a.m. UTC | #1
Pushed with minor changes as 9f23f6bc2f74957ab9832c973647b754448796a2

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 23b980ec3..cb40ce01d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10627,9 +10627,16 @@  useful as a validator for JSON data.")
         (base32
          "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
     (build-system python-build-system)
-    ;; Test suite requires python-setuptools
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'set-pythonpath
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getcwd) "/test/"
+                      ":" (getenv "PYTHONPATH")))
+             #t)))))
     (home-page
      "https://github.com/eliben/pyelftools")
     (synopsis