From ada35de38f6b04bbc3c5d0bed198cf22e5fa22d9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 13 Aug 2022 14:28:50 +0200 Subject: gnu: scons: Move to (gnu packages build-tools). * gnu/packages/python-xyz.scm (scons, scons-python2): Move from here ... * gnu/packages/build-tools.scm (scons, scons-python2): ... to here. * gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/game-development.scm, gnu/packages/gps.scm, gnu/packages/image.scm, gnu/packages/installers.scm, gnu/packages/web.scm, gnu/packages/xdisorg.scm: Adjust module imports accordingly. * guix/build-system/scons.scm (default-scons): Likewise. --- gnu/packages/python-xyz.scm | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f7971b75fa..30645fc4a0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3047,51 +3047,6 @@ (define-public python-poyo and is not compatible with JSON.") (license license:expat))) -(define-public scons - (package - (name "scons") - (version "3.0.4") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/SCons/scons") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn")))) - (build-system python-build-system) - (arguments - `(#:use-setuptools? #f ; still relies on distutils - #:tests? #f ; no 'python setup.py test' command - #:phases - (modify-phases %standard-phases - (add-before 'build 'bootstrap - (lambda _ - (substitute* "src/engine/SCons/compat/__init__.py" - (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)") - "sys.modules[new] = __import__(old)")) - (substitute* "src/engine/SCons/Platform/__init__.py" - (("mod = imp.load_module\\(full_name, file, path, desc\\)") - "mod = __import__(full_name)")) - (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix") - (chdir "build/scons") - #t))))) - (home-page "https://scons.org/") - (synopsis "Software construction tool written in Python") - (description - "SCons is a software construction tool. Think of SCons as an improved, -cross-platform substitute for the classic Make utility with integrated -functionality similar to autoconf/automake and compiler caches such as ccache. -In short, SCons is an easier, more reliable and faster way to build -software.") - (license license:x11))) - -(define-public scons-python2 - (package - (inherit (package-with-python2 scons)) - (name "scons-python2"))) - (define-public python-exceptiongroup (package (name "python-exceptiongroup") -- cgit v1.2.3 From 5831155175614726685edab7efa60ce48e4da1f5 Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Thu, 25 Aug 2022 20:17:55 +0200 Subject: gnu: snakemake-7: Fix cluster execution bug * gnu/packages/python-xyz.scm (snakemake-7)[arguments]: Revise the patch for the cluster execution script Signed-off-by: Marius Bakke --- gnu/packages/python-xyz.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 30645fc4a0..0accf918ee 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -9739,15 +9739,14 @@ (define-public snakemake-7 ;; For cluster execution Snakemake will call Python. Since there is ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We ;; fix this by calling the snakemake wrapper instead. - - ;; XXX: There is another instance of sys.executable on line 692, but - ;; it is not clear how to patch it. (add-after 'unpack 'call-wrapper-not-wrapped-snakemake (lambda* (#:key outputs #:allow-other-keys) (substitute* "snakemake/executors/__init__.py" - (("\\{sys.executable\\} -m snakemake") - (string-append (assoc-ref outputs "out") - "/bin/snakemake"))))) + (("self\\.get_python_executable\\(\\),") + "") + (("\"-m snakemake\"") + (string-append "\"" (assoc-ref outputs "out") + "/bin/snakemake" "\""))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? -- cgit v1.2.3 From 6a31fb6e7b2bc6daba973d440ea4480d57ee6597 Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Thu, 25 Aug 2022 20:46:59 +0200 Subject: gnu: snakemake-6: Convert dependencies to propagated-inputs * gnu/packages/python-xyz.scm (snakemake-6)[inputs]: Change to ... [propagated-inputs]: ... this, to ensure that "python -m snakemake" works (because snakemake uses it internally). Signed-off-by: Marius Bakke --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 0accf918ee..a8248e3ec8 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -9688,7 +9688,7 @@ (define-public snakemake-6 ;; because there are no AWS credentials. (delete-file "tests/test_tibanna.py") (invoke "pytest"))))))) - (inputs + (propagated-inputs (list python-appdirs python-configargparse python-connection-pool -- cgit v1.2.3 From 9529384c92e6427e7d277ffaa391405ef6ab22f3 Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Thu, 25 Aug 2022 20:47:32 +0200 Subject: gnu: snakemake-7: Convert dependencies to propagated-inputs * gnu/packages/python-xyz.scm (snakemake-7)[inputs]: Change to ... [propagated-inputs]: ... this, to ensure that "python -m snakemake" works (because snakemake uses it internally). Signed-off-by: Marius Bakke --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a8248e3ec8..f58677993c 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -9758,7 +9758,7 @@ (define-public snakemake-7 ;; to the Google Storage service. (delete-file "tests/test_google_lifesciences.py") (invoke "pytest"))))))) - (inputs + (propagated-inputs (list python-appdirs python-configargparse python-connection-pool -- cgit v1.2.3 From 619af9f3076fbfb29f4c44e38a74bc1c5808624c Mon Sep 17 00:00:00 2001 From: Tomasz Jeneralczyk Date: Sun, 14 Aug 2022 14:46:20 +0200 Subject: gnu: Add python-mpv. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-mpv): Add variable. Co-authored-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f58677993c..1907b863ff 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -127,6 +127,7 @@ ;;; Copyright © 2022 Philip McGrath ;;; Copyright © 2022 Marek Felšöci ;;; Copyright © 2022 Hilton Chain +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -30430,6 +30431,68 @@ (define-public python-bsdiff4 and @code{bspatch4}.") (license license:bsd-2))) +(define-public python-mpv + (package + (name "python-mpv") + (version "1.0.1") + (source + (origin + ;; python-mpv from pypi does not include the tests directory. + (method git-fetch) + (uri (git-reference + (url "https://github.com/jaseg/python-mpv") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "10w6j3n62ap45sf6q487kz8z6g58sha37i14fa2hhng794z7a8jh")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; One of the tests never completes, so neutering it using + ;; early return allows other test to run without issue. + (substitute* "tests/test_mpv.py" + ;; Note the typo in "prooperty" - this was fixed later in + ;; upstream but has no effect on whether the tests hangs or not. + (("test_wait_for_prooperty_event_overflow.*" line) + ;; The long whitespace between \n and return is to match the + ;; identation level, which is significant in python. + (string-append line "\n return\n"))))))) + (build-system python-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-before 'build 'patch-reference-to-mpv + (lambda* (#:key inputs #:allow-other-keys) + ;; Without an absolute path it is not able find and + ;; load the libmpv library. + (substitute* "mpv.py" + (("sofile = .*") + (string-append "sofile = \"" + (search-input-file inputs "/lib/libmpv.so") + "\"\n"))))) + (add-before 'check 'prepare-for-tests + (lambda _ + ;; Fontconfig throws errors when it has no cache dir to use. + (setenv "XDG_CACHE_HOME" (getcwd)) + ;; Some tests fail without a writable and readable HOME. + (setenv "HOME" (getcwd))))))) + (native-inputs + (list python-xvfbwrapper)) ; needed for tests only + (inputs (list mpv)) + (propagated-inputs (list python-pillow)) ; for raw screenshots + (home-page "https://github.com/jaseg/python-mpv") + (synopsis "Python interface to the mpv media player") + (description + "python-mpv is a ctypes-based python interface to the mpv media player. +It gives you more or less full control of all features of the player, just +as the lua interface does.") + ;; From the project's README: + ;; python-mpv inherits the underlying libmpv's license, which can be either + ;; GPLv2 or later (default) or LGPLv2.1 or later. For details, see the mpv + ;; copyright page. + (license license:gpl2+))) + (define-public python-biblib (let ((upstream-version "0.1.0") (commit "ab0e857b9198fe425ec9b02fcc293b5d9fd0c406") -- cgit v1.2.3 From 80a75c53570a7d4af3d30f441feff8bcce5aa53a Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 28 Aug 2022 16:47:40 +0200 Subject: gnu: python-fonttools-full: Don't ask to run tests when cross-compiling. * gnu/packages/python-xyz.scm (python-fonttools-full)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1907b863ff..8843d10638 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11305,7 +11305,7 @@ (define-public python-fonttools-full (arguments (substitute-keyword-arguments (package-arguments python-fonttools) ((#:tests? _ #f) - #t) + (not (%current-target-system))) ((#:phases phases '%standard-phases) `(modify-phases ,phases (replace 'check -- cgit v1.2.3 From dbd5612c9045fe1d64ea01ee863163eebbe5748c Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 28 Aug 2022 16:47:41 +0200 Subject: gnu: python-path: Don't ask to run tests when cross-compiling. * gnu/packages/python-xyz.scm (python-path)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 8843d10638..d5d15bb46c 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12382,7 +12382,7 @@ (define-public python-path (substitute-keyword-arguments (package-arguments python-path-bootstrap) ((#:tests? _ #f) - #t) + (not (%current-target-system))) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (replace 'check -- cgit v1.2.3 From c548ff6a30705d648e9a704f87001c5090cc8204 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 28 Aug 2022 16:47:42 +0200 Subject: gnu: python-jaraco-functools: Don't ask to run tests when cross-compiling. * gnu/packages/python-xyz.scm (python-jaraco-functools)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index d5d15bb46c..a78005e011 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -8306,7 +8306,7 @@ (define-public python-jaraco-functools (substitute-keyword-arguments (package-arguments python-jaraco-functools-bootstrap) ((#:tests? _ #f) - #t) + (not (%current-target-system))) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (replace 'check -- cgit v1.2.3 From 7d49984da4347532d5a15ec79edafce5d5a97955 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 28 Aug 2022 16:47:43 +0200 Subject: gnu: python-pip-run: Don't ask to run tests when cross-compiling. * gnu/packages/python-xyz.scm (python-pip-run)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a78005e011..e25054da5f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12505,7 +12505,7 @@ (define-public python-pip-run (arguments (substitute-keyword-arguments (package-arguments python-pip-run-bootstrap) ((#:tests? _ #f) - #t) + (not (%current-target-system))) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (replace 'check -- cgit v1.2.3 From 321620d15ba0400be0253c0423aea633d374ab7b Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 28 Aug 2022 16:47:44 +0200 Subject: gnu: python-jupyter-client: Don't ask to run tests when cross-compiling. * gnu/packages/python-xyz.scm (python-jupyter-client)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e25054da5f..7a91321528 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -8706,7 +8706,7 @@ (define-public python-jupyter-client (arguments (substitute-keyword-arguments (package-arguments base) ((#:tests? _ #f) - #t) + (not (%current-target-system))) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (replace 'check -- cgit v1.2.3 From d720aa4a88c77d1ba84c05e404ceae8589d9c110 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 28 Aug 2022 16:47:45 +0200 Subject: gnu: python-jaraco-context: Don't ask to run tests when cross-compiling. * gnu/packages/python-xyz.scm (python-jaraco-context)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7a91321528..9b3d5edb93 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -8255,7 +8255,7 @@ (define-public python-jaraco-context (substitute-keyword-arguments (package-arguments python-jaraco-context-bootstrap) ((#:tests? _ #f) - #t) + (not (%current-target-system))) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (replace 'check -- cgit v1.2.3