* [bug#53943] [PATCH] Add python-stltools
@ 2022-02-11 19:00 Evgeny Pisemsky
2022-02-25 19:49 ` Maxime Devos
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Evgeny Pisemsky @ 2022-02-11 19:00 UTC (permalink / raw)
To: 53943
[-- Attachment #1: Type: text/plain, Size: 259 bytes --]
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.
[-- Attachment #2: 0001-gnu-Add-python-stltools.patch --]
[-- Type: text/x-patch, Size: 2940 bytes --]
From c6fcae5568da38a66e67947f6d20d7228923c626 Mon Sep 17 00:00:00 2001
From: Evgeny Pisemsky <evgeny@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@greghogan.com>
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
+;;; Copyright © 2022 Evgeny Pisemsky <evgeny@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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#53943] [PATCH] Add python-stltools
2022-02-11 19:00 [bug#53943] [PATCH] Add python-stltools Evgeny Pisemsky
@ 2022-02-25 19:49 ` Maxime Devos
2022-02-25 19:51 ` Maxime Devos
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-02-25 19:49 UTC (permalink / raw)
To: Evgeny Pisemsky, 53943
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
Evgeny Pisemsky schreef op vr 11-02-2022 om 22:00 [+0300]:
> + (replace 'check
> + (lambda _
> + (invoke "py.test" "-v"))))))
For cross-compilation and to make "--without-tests" work, this phase
needs to respect #:tests?, try
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "py.test" "-v")))))))
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#53943] [PATCH] Add python-stltools
2022-02-11 19:00 [bug#53943] [PATCH] Add python-stltools Evgeny Pisemsky
2022-02-25 19:49 ` Maxime Devos
@ 2022-02-25 19:51 ` Maxime Devos
2022-02-25 19:58 ` Maxime Devos
2022-02-25 19:55 ` Maxime Devos
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Maxime Devos @ 2022-02-25 19:51 UTC (permalink / raw)
To: Evgeny Pisemsky, 53943
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
Evgeny Pisemsky schreef op vr 11-02-2022 om 22:00 [+0300]:
> + `(#:use-setuptools? #f
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'build)
> + [replace the install phase]
Most of the time (but not always!), the default build and install
phases and the default of #:use-setuptools? is fine. Could you
elaborate what is the issue?
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#53943] [PATCH] Add python-stltools
2022-02-11 19:00 [bug#53943] [PATCH] Add python-stltools Evgeny Pisemsky
2022-02-25 19:49 ` Maxime Devos
2022-02-25 19:51 ` Maxime Devos
@ 2022-02-25 19:55 ` Maxime Devos
2022-02-25 20:02 ` Maxime Devos
[not found] ` <handler.53943.B.164460604623122.ack@debbugs.gnu.org>
4 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-02-25 19:55 UTC (permalink / raw)
To: Evgeny Pisemsky, 53943
[-- Attachment #1: Type: text/plain, Size: 531 bytes --]
Evgeny Pisemsky schreef op vr 11-02-2022 om 22:00 [+0300]:
> + (description "Python modules and scripts for handling
> +stereolithography (STL) files.")
Perhaps the description can be extended a bit? Maybe:
"This package consists of Python modules and scripts for manipulating
stereolithography (STL) files. It can convert STL files into POV-ray
meshes, PDF and PostScript. The Python modules allow for reading
and writing STL files. It supports both the text and binary forms
of STL."
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#53943] [PATCH] Add python-stltools
2022-02-11 19:00 [bug#53943] [PATCH] Add python-stltools Evgeny Pisemsky
` (2 preceding siblings ...)
2022-02-25 19:55 ` Maxime Devos
@ 2022-02-25 20:02 ` Maxime Devos
[not found] ` <handler.53943.B.164460604623122.ack@debbugs.gnu.org>
4 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-02-25 20:02 UTC (permalink / raw)
To: Evgeny Pisemsky, 53943
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
Evgeny Pisemsky schreef op vr 11-02-2022 om 22:00 [+0300]:
> + (arguments
> + `(#:use-setuptools? #f
> + #:phases
> + (modify-phases %standard-phases
To make sure that 'stl2pov' and friends of 'python-sltools' can find
its dependencies when run outside a profile (somewhat niche but
occassionaly useful), some wrapping may be necessary (search for 'wrap-
program'). Maybe python-build-system does that automatically though
...
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <handler.53943.B.164460604623122.ack@debbugs.gnu.org>]
* [bug#53943] Acknowledgement ([PATCH] Add python-stltools)
[not found] ` <handler.53943.B.164460604623122.ack@debbugs.gnu.org>
@ 2022-02-25 17:50 ` Evgeny Pisemsky
2022-02-28 6:00 ` Evgeny Pisemsky
1 sibling, 0 replies; 9+ messages in thread
From: Evgeny Pisemsky @ 2022-02-25 17:50 UTC (permalink / raw)
To: 53943
Any feedback?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#53943] Acknowledgement ([PATCH] Add python-stltools)
[not found] ` <handler.53943.B.164460604623122.ack@debbugs.gnu.org>
2022-02-25 17:50 ` [bug#53943] Acknowledgement ([PATCH] Add python-stltools) Evgeny Pisemsky
@ 2022-02-28 6:00 ` Evgeny Pisemsky
2022-03-06 21:19 ` bug#53943: [PATCH] Add python-stltools Ludovic Courtès
1 sibling, 1 reply; 9+ messages in thread
From: Evgeny Pisemsky @ 2022-02-28 6:00 UTC (permalink / raw)
To: 53943
[-- Attachment #1: Type: text/plain, Size: 56 bytes --]
Thank you for suggestions!
Here is the updated patch.
[-- Attachment #2: 0001-gnu-Add-python-stltools.patch --]
[-- Type: text/x-patch, Size: 3232 bytes --]
From 8fec01fed636b43a14230d1a4556d01e8c3cf223 Mon Sep 17 00:00:00 2001
From: Evgeny Pisemsky <evgeny@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 | 47 +++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c05502388e..c981ccb709 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -116,6 +116,7 @@
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
+;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29034,3 +29035,49 @@ (define-public python-types-ujson
used by type-checking tools like mypy, PyCharm, pytype etc. to check code that
uses ujson.")
(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* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "py.test" "-v")))))))
+ (propagated-inputs (list python-pycairo))
+ (native-inputs (list python-pytest))
+ (home-page "https://github.com/rsmith-nl/stltools")
+ (synopsis "Python modules and scripts for handling STL files")
+ (description "This package consists of Python modules and scripts for
+manipulating stereolithography (STL) files. It can convert STL files into
+POV-ray meshes, PDF and PostScript. The Python modules allow for reading and
+writing STL files. It supports both the text and binary forms of STL.")
+ (license license:expat)))
base-commit: 61a847187d781bcecdc77fbec1fb75d1b9531e55
--
2.34.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#53943: [PATCH] Add python-stltools
2022-02-28 6:00 ` Evgeny Pisemsky
@ 2022-03-06 21:19 ` Ludovic Courtès
0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2022-03-06 21:19 UTC (permalink / raw)
To: Evgeny Pisemsky; +Cc: Maxime Devos, 53943-done
Hi,
Evgeny Pisemsky <evgeny@pisemsky.com> skribis:
>>From 8fec01fed636b43a14230d1a4556d01e8c3cf223 Mon Sep 17 00:00:00 2001
> From: Evgeny Pisemsky <evgeny@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’.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-03-06 21:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-11 19:00 [bug#53943] [PATCH] Add python-stltools Evgeny Pisemsky
2022-02-25 19:49 ` Maxime Devos
2022-02-25 19:51 ` Maxime Devos
2022-02-25 19:58 ` Maxime Devos
2022-02-25 19:55 ` Maxime Devos
2022-02-25 20:02 ` Maxime Devos
[not found] ` <handler.53943.B.164460604623122.ack@debbugs.gnu.org>
2022-02-25 17:50 ` [bug#53943] Acknowledgement ([PATCH] Add python-stltools) Evgeny Pisemsky
2022-02-28 6:00 ` Evgeny Pisemsky
2022-03-06 21:19 ` bug#53943: [PATCH] Add python-stltools Ludovic Courtès
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.