summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/engineering.scm66
-rw-r--r--gnu/packages/python-xyz.scm32
2 files changed, 98 insertions, 0 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index c6905d3308..451d5ab9c9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3438,6 +3438,72 @@ models in the STL and OFF file formats.")
(home-page "https://openscad.org/")
(license license:gpl2+))))
+(define-public pythonscad
+ (let ((commit "e2641ca1a208a9a54a034a8818a9774ad4d5867c")
+ (version "0.0.0")
+ (revision "0"))
+ (package
+ (inherit openscad)
+ (name "pythonscad")
+ (version (git-version version revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pythonscad/pythonscad")
+ (commit commit)
+ ;; Needed for libraries/MCAD, a library specific to OpenSCAD
+ ;; which is included as a submodule. All other libraries are
+ ;; deleted in the patch-source build phase.
+ (recursive? #t)))
+ (sha256
+ (base32 "1i6yajamdrha2kpgyhn7jn6dv35qmgq0zsqv8cdzdqg5142v66ay"))
+ (modules '((guix build utils)))
+ (snippet #~(begin
+ ;; Delete all unbundled libraries to replace them with
+ ;; guix packages.
+ (delete-file-recursively "submodules")
+ (substitute* "CMakeLists.txt"
+ ;; Remove bundled libraries from cmake.
+ (("add_subdirectory\\(submodules\\)")
+ ""))))
+ (file-name (git-file-name name version))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments openscad)
+ ((#:configure-flags flags
+ '())
+ #~(append #$flags
+ (list "-DENABLE_LIBFIVE=ON" "-DUSE_BUILTIN_LIBFIVE=OFF"
+ (string-append "-DPYTHON_VERSION="
+ #$(version-major+minor
+ (package-version python))))))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "CMakeLists.txt"
+ ;; Fix detection of EGL (see
+ ;; https://github.com/openscad/openscad/issues/5880).
+ (("target_link_libraries\\(OpenSCAD PRIVATE OpenGL::EGL\\)")
+ "find_package(ECM REQUIRED NO_MODULE)
+ list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+ find_package(EGL REQUIRED)
+ target_link_libraries(OpenSCAD PRIVATE EGL::EGL)")
+ ;; Use the system sanitizers-cmake module.
+ (("\\$\\{CMAKE_SOURCE_DIR\\}/submodules/sanitizers-cmake/cmake")
+ (string-append (assoc-ref inputs "sanitizers-cmake")
+ "/share/sanitizers-cmake/cmake")))))))))
+ (inputs (modify-inputs (package-inputs openscad)
+ (append curl libfive)))
+ (synopsis "Script-based 3D modeling app whith Python support")
+ (description
+ "PythonSCAD is a programmatic 3D modeling application. It allows you
+to turn simple code into 3D models suitable for 3D printing. It is a fork of
+OpenSCAD which not only adds support for using Python as a native language,
+but also adds new features and improves existing ones.")
+ (home-page "https://pythonscad.org/")
+ (license license:gpl2+))))
+
(define-public emacs-scad-mode
(package
(name "emacs-scad-mode")
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 03f2828cfc..851917c26d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -165,6 +165,7 @@
;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx@disroot.org>
;;; Copyright © 2025, Cayetano Santos <csantosb@inventati.org>
;;; Copyright © 2025 Jake Forster <jakecameron.forster@gmail.com>
+;;; Copyright © 2025 Luis Felipe López Acevedo <sirgazil@zoho.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1175,6 +1176,37 @@ attribution. It uses similarity detection algorithms to compare code files
and highlight matching sections.")
(license license:agpl3+)))
+(define-public python-wheel-filename
+ (package
+ (name "python-wheel-filename")
+ (version "1.4.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "wheel_filename" version))
+ (sha256
+ (base32 "1zcqq8mydjjrk8x5xlm53bavs51jm40nz42a7500pd6bbm31r2c7"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-hatchling python-pytest python-pytest-cov))
+ (home-page "https://github.com/wheelodex/wheel-filename")
+ (synopsis "Parse wheel filenames")
+ (description
+ "This software allows you to verify
+@url{https://packaging.python.org/en/latest/specifications/binary-distribution-format/, wheel}
+filenames and parse them into their component fields.
+
+This package adheres strictly to the standard, with the following
+exceptions:
+
+@itemize @bullet
+@item
+Version components may be any sequence of the relevant set of
+characters; they are not verified for PEP 440 compliance.
+@item
+The @file{.whl} file extension is matched case-insensitively.
+@end itemize")
+ (license license:expat)))
+
(define-public python-xmldiff
(package
(name "python-xmldiff")