guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: python-anaconda-client: Fix build with Pytho


From: guix-commits
Subject: branch master updated: gnu: python-anaconda-client: Fix build with Python 3.10.
Date: Tue, 06 Jun 2023 07:06:29 -0400

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

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 0ae29db11d gnu: python-anaconda-client: Fix build with Python 3.10.
0ae29db11d is described below

commit 0ae29db11d0c4a92d12b6cc604c868882336aced
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Jun 6 13:04:14 2023 +0200

    gnu: python-anaconda-client: Fix build with Python 3.10.
    
    * gnu/packages/package-management.scm 
(python-anaconda-client)[build-system]:
    Use pyproject-bulid-system.
    [arguments]: Move contents of 'remove-network-tests phase to #:test-flags;
    drop trailing #T from 'set-HOME phase; add phase 'python3.10-compatibility;
    disable test_conda_root and test_conda_root_outside_root_environment.
---
 gnu/packages/package-management.scm | 53 ++++++++++++++++++++++---------------
 1 file changed, 31 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/package-management.scm 
b/gnu/packages/package-management.scm
index a856ff2726..9532fd7187 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013-2023 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015, 2017, 2020, 2021, 2022 Ricardo Wurmus 
<rekado@elephly.net>
+;;; Copyright © 2015, 2017, 2020, 2021, 2022, 2023 Ricardo Wurmus 
<rekado@elephly.net>
 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
 ;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
@@ -120,6 +120,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system guile)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (guix build-system ruby)
   #:use-module (guix build-system trivial)
@@ -917,7 +918,34 @@ transactions from C or Python.")
        (sha256
         (base32
          "1vyk0g0gci4z9psisb8h50zi3j1nwfdg1jw3j76cxv0brln0v3fw"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      ;; These tests require a network connection
+      '(append (map (lambda (file)
+                      (string-append "--ignore=binstar_client/" file))
+                    (list "tests/test_upload.py"
+                          "tests/test_authorizations.py"
+                          "tests/test_login.py"
+                          "tests/test_whoami.py"
+                          "utils/notebook/tests/test_data_uri.py"
+                          "utils/notebook/tests/test_base.py"
+                          "utils/notebook/tests/test_downloader.py"
+                          "inspect_package/tests/test_conda.py"))
+               ;; get_conda_root returns None
+               (list "-k"
+                     "not test_conda_root \
+and not test_conda_root_outside_root_environment"))
+      #:phases
+      '(modify-phases %standard-phases
+         (add-after 'unpack 'python3.10-compatibility
+           (lambda _
+             (substitute* "binstar_client/utils/config.py"
+               (("collections.Mapping") "collections.abc.Mapping"))))
+         ;; This is needed for some tests.
+         (add-before 'check 'set-HOME
+           (lambda _ (setenv "HOME" "/tmp"))))))
     (propagated-inputs
      (list python-clyent python-nbformat python-pyyaml python-requests))
     (native-inputs
@@ -926,27 +954,8 @@ transactions from C or Python.")
            python-freezegun
            python-mock
            python-pillow
+           python-pytest
            python-pytz))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; This is needed for some tests.
-         (add-before 'check 'set-up-home
-           (lambda* _ (setenv "HOME" "/tmp") #t))
-         (add-before 'check 'remove-network-tests
-           (lambda* _
-             ;; Remove tests requiring a network connection
-             (let ((network-tests '("tests/test_upload.py"
-                                    "tests/test_authorizations.py"
-                                    "tests/test_login.py"
-                                    "tests/test_whoami.py"
-                                    "utils/notebook/tests/test_data_uri.py"
-                                    "utils/notebook/tests/test_base.py"
-                                    "utils/notebook/tests/test_downloader.py"
-                                    "inspect_package/tests/test_conda.py")))
-               (with-directory-excursion "binstar_client"
-                 (for-each delete-file network-tests)))
-             #t)))))
     (home-page "https://github.com/Anaconda-Platform/anaconda-client";)
     (synopsis "Anaconda Cloud command line client library")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]