all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 70489@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>,
	Andreas Enge <andreas@enge.fr>, Eric Bavier <bavier@posteo.net>,
	Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#70489] [PATCH 13/47] gnu: python-astropy: Symplify package.
Date: Sun, 21 Apr 2024 00:22:02 +0100	[thread overview]
Message-ID: <9b1e5844216479db0df08f8947c79b3c09ee86a4.1713654571.git.sharlatanus@gmail.com> (raw)
In-Reply-To: <cover.1713654571.git.sharlatanus@gmail.com>

* gnu/packages/astronomy.scm (python-astropy): Simplify package.
[build-system]: Swap to pyproject-build-system.
[arguments] <#:phases>: Merge 'prepare-test-environment into custom
'check phase and move test arguments to <#:test-arguments>.

Change-Id: I80098c3eb4e9d95ef2c651d5416196165be3f7c0
---
 gnu/packages/astronomy.scm | 47 ++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 567cb54685..fc3c652132 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1565,9 +1565,20 @@ (define-public python-astropy
            ;; see https://github.com/astropy/astropy/pull/14311
            (with-directory-excursion "cextern"
              (for-each delete-file-recursively '("expat" "wcslib")))))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
      (list
+      #:test-flags
+      #~(list "--pyargs" "astropy"
+              "-n" "auto"
+              "-k" (string-append
+                    ;; Skip tests that need remote data.
+                    "not remote_data"
+                    ;; E astropy.samp.errors.SAMPProxyError:
+                    ;; <SAMPProxyError 1: 'Timeout expired!'>
+                    " and not test_main"
+                    ;; E ModuleNotFoundError: No module named 'wofz'
+                    " and not test_pickle_functional"))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'preparations
@@ -1587,32 +1598,18 @@ (define-public python-astropy
           (add-before 'install 'writable-compiler
             (lambda _
               (make-file-writable "astropy/_compiler.c")))
-          (add-before 'check 'prepare-test-environment
-            (lambda _
-              ;; Some tests require a writable home.
-              (setenv "HOME" "/tmp")
-              (make-file-writable "astropy/_compiler.c")
-              ;; Extensions have to be rebuilt before running the tests.
-              (invoke "python" "setup.py" "build_ext" "--inplace"
-                      "-j" (number->string (parallel-job-count)))))
-          ;; TODO: The swap to pyproject-build-system introduced all tests
-          ;; failed due to pytest could not load conftest.py, find out how
-          ;; to resolve it and migrate completely to pyproject-build-system.
           (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
+            (lambda* (#:key tests? test-flags #:allow-other-keys)
               (when tests?
-                (invoke "python" "-m" "pytest" "--pyargs" "astropy"
-                        ;; with    -n : 133.00s
-                        ;; without -n : 326.14s
-                        "-n" (number->string (parallel-job-count))
-                        "-k" (string-append
-                              ;; Skip tests that need remote data.
-                              "not remote_data"
-                              ;; E astropy.samp.errors.SAMPProxyError:
-                              ;; <SAMPProxyError 1: 'Timeout expired!'>
-                              " and not test_main"
-                              ;; E ModuleNotFoundError: No module named 'wofz'
-                              " and not test_pickle_functional"))))))))
+                (setenv "HOME" "/tmp")
+                (make-file-writable "astropy/_compiler.c")
+                ;; Extensions have to be rebuilt before running the tests.
+                (invoke "python" "setup.py" "build_ext" "--inplace"
+                        "-j" (number->string (parallel-job-count)))
+                ;; Step out of the source directory to avoid interference; we
+                ;; want to run the installed code with extensions etc.
+                (with-directory-excursion "/tmp"
+                  (apply invoke "pytest" "-v" test-flags))))))))
     (native-inputs
      (list pkg-config
            python-colorlog
-- 
2.41.0





  parent reply	other threads:[~2024-04-20 23:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 23:15 [bug#70488] [PATCH 00/47] Astronomy 2024/02 updates Sharlatan Hellseher
2024-04-20 23:19 ` bug#70488: " Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 01/47] gnu: cfitsio: Update to 4.4.0 Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 02/47] gnu: stellarium: Update to 24.1 Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 03/47] gnu: indi-2.0: Update to 2.0.7 Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 04/47] gnu: libxisf: Update to 0.2.12 Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 05/47] gnu: python-pytest-socket: Update to 0.7.0 Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 06/47] gnu: parfive: Update to 2.1.0 Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 07/47] gnu: python-exif-read: Update to 3.0.0 Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 08/47] gnu: Add python-pysiaf Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 09/47] gnu: Add python-supersmoother Sharlatan Hellseher
2024-04-20 23:21 ` [bug#70489] [PATCH 10/47] gnu: python-asdf: Update to 3.2.0 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 11/47] gnu: python-asdf-astropy: Update to 0.6.1 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 12/47] gnu: python-astropy-iers-data: Update to 0.2024.4.15.2.45.49 Sharlatan Hellseher
2024-04-20 23:22 ` Sharlatan Hellseher [this message]
2024-04-20 23:22 ` [bug#70489] [PATCH 14/47] gnu: python-astropy: Update to 6.0.1 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 15/47] gnu: python-astropy-healpix: Update to 1.0.3 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 16/47] gnu: python-jwst: Update to 1.14.0 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 17/47] gnu: python-stcal: Update to 1.7.0 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 18/47] gnu: python-stdatamodels: Update to 1.10.1 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 19/47] gnu: python-stsci-imagestats: Update to 1.8.2 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 20/47] gnu: python-stsci-image: Refresh package style Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 21/47] gnu: python-synphot: Add custom check phase Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 22/47] gnu: python-synphot: Update to 1.4.0 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 23/47] gnu: python-tweakwcs: Adjust indentation Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 24/47] gnu: python-tweakwcs: Update to 0.8.7 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 25/47] gnu: python-ginga: Update to 5.0.1 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 26/47] gnu: python-ginga: Set HOME for sanity check Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 27/47] gnu: python-gatspy: Refresh package style Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 28/47] gnu: python-bayesicfitting: " Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 29/47] gnu: python-bayesicfitting: Update to 3.2.1 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 30/47] gnu: Add python-assay Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 31/47] gnu: python-skyfield: Enable tests Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 32/47] gnu: python-sunpy: Update to 5.1.2 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 33/47] gnu: python-astroplan: Update to 0.10 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 34/47] gnu: python-rad: Update to 0.19.2 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 35/47] gnu: python-regions: Update to 0.9 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 36/47] gnu: python-roman-datamodels: Update to 0.19.1 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 37/47] gnu: python-casa-formats-io: Update to 0.3.0 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 38/47] gnu: python-specutils: Update to 1.14.0 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 39/47] gnu: python-photutils: Update to 1.12 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 40/47] gnu: python-reproject: Update to 0.13.1 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 41/47] gnu: python-reproject: Enable tests Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 42/47] gnu: python-asdf: Adjust inputs Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 43/47] gnu: python-crds: Update to 11.17.20 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 44/47] gnu: python-stsci-stimage: Update to 0.2.8 Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 45/47] gnu: python-stsci-stimage: Adjust test steps Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 46/47] gnu: Add scamp Sharlatan Hellseher
2024-04-20 23:22 ` [bug#70489] [PATCH 47/47] gnu: Add psfex Sharlatan Hellseher
2024-05-01  7:06 ` bug#70489: [PATCH 00/47] Astronomy 2024/04 updates Sharlatan Hellseher
2024-05-04  4:29   ` [bug#70489] " Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b1e5844216479db0df08f8947c79b3c09ee86a4.1713654571.git.sharlatanus@gmail.com \
    --to=sharlatanus@gmail.com \
    --cc=70489@debbugs.gnu.org \
    --cc=andreas@enge.fr \
    --cc=bavier@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.