GNU bug report logs - #53943
[PATCH] Add python-stltools

Previous Next

Package: guix-patches;

Reported by: Evgeny Pisemsky <evgeny <at> pisemsky.com>

Date: Fri, 11 Feb 2022 19:01:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#53943: closed ([PATCH] Add python-stltools)
Date: Sun, 06 Mar 2022 21:20:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 06 Mar 2022 22:19:37 +0100
with message-id <87ilsqkcd2.fsf_-_ <at> gnu.org>
and subject line Re: bug#53943: [PATCH] Add python-stltools
has caused the debbugs.gnu.org bug report #53943,
regarding [PATCH] Add python-stltools
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
53943: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53943
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Evgeny Pisemsky <evgeny <at> pisemsky.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] Add python-stltools
Date: Fri, 11 Feb 2022 22:00:28 +0300
[Message part 3 (text/plain, inline)]
Hello!

The source of this package contains custom setup.py script, which does
not work with python-build-system, so I just copied files around in
package definition, and this seems worked.

However, I am not sure if it is an appropriate way of intallation.

[0001-gnu-Add-python-stltools.patch (text/x-patch, inline)]
From c6fcae5568da38a66e67947f6d20d7228923c626 Mon Sep 17 00:00:00 2001
From: Evgeny Pisemsky <evgeny <at> pisemsky.com>
Date: Fri, 11 Feb 2022 19:55:13 +0300
Subject: [PATCH] gnu: Add python-stltools.

* gnu/packages/python-xyz.scm (python-stltools): New variable.
---
 gnu/packages/python-xyz.scm | 44 +++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 41b60325d2..e72d5baed7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -116,6 +116,7 @@
 ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com>
 ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Aleksandr Vityazev <avityazev <at> posteo.org>
+;;; Copyright © 2022 Evgeny Pisemsky <evgeny <at> pisemsky.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28933,3 +28934,46 @@ (define-public python-types-dataclasses
      "This packages provides a collection of library stubs for Python, with
 static types.")
     (license license:asl2.0)))
+
+(define-public python-stltools
+  (package
+    (name "python-stltools")
+    (version "2022.01.20")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rsmith-nl/stltools")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1k6dhszza4lpy46qffaqx5zr70ikfqqysbacy7zabnrvz09fd4rs"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:use-setuptools? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((moddir (string-append (site-packages inputs outputs) "/stltools"))
+                   (bindir (string-append (assoc-ref outputs "out") "/bin")))
+               (copy-recursively "stltools" moddir)
+               (mkdir-p bindir)
+               (for-each
+                (lambda (script)
+                  (let ((source (string-append script ".py"))
+                        (target (string-append bindir "/" script)))
+                    (copy-file source target)
+                    (chmod target #o555)))
+                '("stl2pov" "stl2ps" "stl2pdf" "stlinfo")))))
+         (replace 'check
+           (lambda _
+             (invoke "py.test" "-v"))))))
+    (propagated-inputs (list python-pycairo))
+    (native-inputs (list python-pytest))
+    (home-page "https://github.com/rsmith-nl/stltools")
+    (synopsis "Tools to manipulate STL files")
+    (description "Python modules and scripts for handling
+stereolithography (STL) files.")
+    (license license:expat)))

base-commit: 6baf2177df36bc33e79f1c71198dfe04d242efb2
-- 
2.34.0

[Message part 5 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Evgeny Pisemsky <evgeny <at> pisemsky.com>
Cc: Maxime Devos <maximedevos <at> telenet.be>, 53943-done <at> debbugs.gnu.org
Subject: Re: bug#53943: [PATCH] Add python-stltools
Date: Sun, 06 Mar 2022 22:19:37 +0100
Hi,

Evgeny Pisemsky <evgeny <at> pisemsky.com> skribis:

>>From 8fec01fed636b43a14230d1a4556d01e8c3cf223 Mon Sep 17 00:00:00 2001
> From: Evgeny Pisemsky <evgeny <at> pisemsky.com>
> Date: Fri, 11 Feb 2022 19:55:13 +0300
> Subject: [PATCH] gnu: Add python-stltools.
>
> * gnu/packages/python-xyz.scm (python-stltools): New variable.

Applied.  Thanks you, and thanks Maxime for reviewing!

Ludo’.


This bug report was last modified 3 years and 76 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.