From 7bfb520b7fddb513ebe6b7536f4dfbf4270bedbb Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Tue, 24 Mar 2026 11:14:39 +0100 Subject: [PATCH] gnu: python-orsopy: Switch to pyproject. * gnu/packages/python-science.scm (python-orsopy): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:test-flags>: Set them. <#:phases>: Drop them accordingly. [native-inputs]: Add python-setuptools. Change-Id: Ic7116a6d6a23eea4b8e15c557b2967fd9d0d48af Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 47a837ffd9..c485a30633 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -6685,28 +6685,29 @@ Python style, together with a fast and comfortable execution environment.") (version "1.2.1") (source (origin - (method url-fetch) - (uri (pypi-uri "orsopy" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/reflectivity/orsopy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "1fpp9h93p55sa4cfsix71ibj74fdrgh2kzmw2rg06ya8q0c4ndik")))) - (build-system python-build-system) + (base32 "15av7b38h9x0f09dzxb111r2kxm6an461l9ajb01r8r7mv7m5bw9")))) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" - ;; These tests require network access. - "--ignore=orsopy/slddb/tests/test_webapi.py" - "--deselect=orsopy/fileio/tests/test_model_language.py::TestSubStack::test_resolve_layers" - "--deselect=orsopy/fileio/tests/test_model_language.py::TestMaterial::test_density_lookup_elements" - "--deselect=orsopy/fileio/tests/test_model_language.py::TestSampleModel::test_resolve_to_layers"))))))) + #:test-flags + ;; These tests require network access. + #~(list "--ignore=orsopy/slddb/tests/test_webapi.py" + (map (lambda (test) + (string-append "--deselect=orsopy/fileio/tests/" + "test_model_language.py::" test)) + (list "TestSubStack::test_resolve_layers" + "TestMaterial::test_density_lookup_elements" + "TestSampleModel::test_resolve_to_layers"))))) (propagated-inputs (list python-numpy python-pyyaml python-jsonschema python-h5py)) (native-inputs - (list python-pytest python-pint)) + (list python-pint python-pytest python-setuptools)) (home-page "https://github.com/reflectivity/orsopy") (synopsis "Open Reflectometry Standards Organization Python tools") (description