unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 68672@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>,
	Lars-Dominik Braun <lars@6xq.net>, Marius Bakke <marius@gnu.org>,
	Munyoki Kilyungi <me@bonfacemunyoki.com>,
	Sharlatan Hellseher <sharlatanus@gmail.com>,
	jgart <jgart@dismail.de>
Subject: [bug#68672] [PATCH 2/2] gnu: python-trimesh: Enable tests.
Date: Tue, 23 Jan 2024 11:53:12 +0000	[thread overview]
Message-ID: <0d36a93b30f85ad0e77ce00ab5b480b53e830a1a.1706010234.git.sharlatanus@gmail.com> (raw)
In-Reply-To: <cover.1706010234.git.sharlatanus@gmail.com>

* gnu/packages/python-science.scm (python-trimesh): Enable tests and
apply new package style.
[source]: Use git checkout which has working test suit.
[arguments]<#:test-flags>: Disable tests requiring optional Python
modules.
[propagated-inputs]: Add python-chardet, python-colorlog python-httpx
python-jsonschema python-lxml python-networkx python-pillow
python-requests python-rtree python-scipy python-setuptools
python-shapely python-sympy and python-xxhash.

Change-Id: I1aa363053c2d736bc44b8f9071c637256cc2d952
---
 gnu/packages/python-science.scm | 68 +++++++++++++++++++++++++--------
 1 file changed, 53 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 7212cafe16..50b59b7daa 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -50,6 +50,7 @@ (define-module (gnu packages python-science)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages digest)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages geo)
   #:use-module (gnu packages image)
@@ -396,28 +397,65 @@ (define-public python-trimesh
     (version "4.0.10")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "trimesh" version))
+       (method git-fetch) ; no tests in PyPI
+       (uri (git-reference
+             (url "https://github.com/mikedh/trimesh")
+             (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "1p3cnkajh2zmp6zwn23q3c73jcjlkq61h3r53ys0bmg58l8kpqrn"))))
+        (base32 "0ry04qaw0pb3hkxv4gmna87jwk97aqangd21wbr2dr4xshmkbyyb"))))
     (build-system pyproject-build-system)
-    (propagated-inputs
-     (list python-numpy))
+    (arguments
+     (list
+      #:test-flags
+      #~(list "-k" (string-append
+                    ;; XXX: When more optional modules are available review
+                    ;; disabled tests once again.
+                    ;;
+                    ;; Disable tests requiring optional, not packed modules.
+                    "not test_material_round"
+                    " and not test_bezier_example"
+                    " and not test_discrete"
+                    " and not test_dxf"
+                    " and not test_layer"
+                    " and not test_multi_nodupe"
+                    " and not test_obj_roundtrip"
+                    " and not test_roundtrip"
+                    " and not test_scene"
+                    " and not test_slice_onplane"
+                    " and not test_svg"
+                    " and not test_svg"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-build
+            (lambda _
+              (substitute* "trimesh/resources/templates/blender_boolean.py.tmpl"
+                (("\\$MESH_PRE")
+                 "'$MESH_PRE'")))))))
     (native-inputs
      (list python-coveralls
            python-pyinstrument
            python-pytest
            python-pytest-cov))
-    (arguments
-     `(;; TODO: Get tests to work.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-build
-           (lambda _
-             (substitute* "trimesh/resources/templates/blender_boolean.py.tmpl"
-               (("\\$MESH_PRE")
-                "'$MESH_PRE'")))))))
+    (propagated-inputs
+     (list python-chardet
+           python-colorlog
+           python-httpx
+           python-jsonschema
+           python-lxml
+           python-networkx
+           python-numpy
+           python-pillow
+           ;; python-pycollada   ; not packed yet, optional
+           ;; python-pyglet      ; not packed yet, optional
+           python-requests
+           python-rtree
+           python-scipy
+           python-setuptools
+           python-shapely
+           ;; python-svg-path   ; not packed yet, optional
+           python-sympy
+           python-xxhash))
     (home-page "https://github.com/mikedh/trimesh")
     (synopsis "Python library for loading and using triangular meshes")
     (description
-- 
2.41.0





  parent reply	other threads:[~2024-01-23 11:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 11:47 [bug#68672] [PATCH 0/2]gnu: python-trimesh: Update to 4.0.10 and enable tests Sharlatan Hellseher
2024-01-23 11:53 ` [bug#68672] [PATCH 1/2] gnu: python-trimesh: Update to 4.0.10 Sharlatan Hellseher
2024-01-23 11:53 ` Sharlatan Hellseher [this message]
2024-01-28 23:10 ` bug#68672: [PATCH 0/2] gnu: python-trimesh: Update to 4.0.10 and enable tests Sharlatan Hellseher

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=0d36a93b30f85ad0e77ce00ab5b480b53e830a1a.1706010234.git.sharlatanus@gmail.com \
    --to=sharlatanus@gmail.com \
    --cc=68672@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=marius@gnu.org \
    --cc=me@bonfacemunyoki.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).