gnu: python-pymol: Update to 3.1.0.

* gnu/packages/chemistry.scm (python-pymol): Update to 3.1.0.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:tests?>: Disable them.
<#:phases>: Refresh them.  Delete 'build phase.
[native-inputs]: Add cmake-minimal, python-pytest, python-setuptools.
[propagated-inputs]: Add python-numpy.
[description]: Improve style.

Change-Id: Ida6105297f294e3fda060d8c8b938fe743faf6e6
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves 2025-09-23 23:54:22 +02:00 committed by Sharlatan Hellseher
parent 5f4fc7c5b2
commit ea4e755f69
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -720,7 +720,7 @@ quantum chemistry (and molecular mechanics) softwares.")
(define-public python-pymol (define-public python-pymol
(package (package
(name "python-pymol") (name "python-pymol")
(version "2.5.0") (version "3.1.0")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -729,54 +729,61 @@ quantum chemistry (and molecular mechanics) softwares.")
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "08zmfgclkbjkqjpq8xs1mphs1i8rpqj76mcw7m2mrhvma5qj1nr5")))) (base32 "199zhpdljsvfjnvs7h7q17ib7ajnjiwg790rg8xxhaszjd968byq"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
'(#:configure-flags (list
(list "--glut" "--testing") ;; XXX: Most tests fail with import errors.
#:phases #:tests? #f
(modify-phases %standard-phases #:configure-flags
(add-after 'unpack 'make-reproducible #~(list "--glut" "--testing")
(lambda _ #:phases
(substitute* "create_shadertext.py" #~(modify-phases %standard-phases
(("time\\.time\\(\\)") "0")))) (add-after 'unpack 'make-reproducible
(add-after 'unpack 'add-include-directories (lambda _
(lambda* (#:key inputs #:allow-other-keys) (substitute* "create_shadertext.py"
(setenv "CPLUS_INCLUDE_PATH" (("time\\.time\\(\\)")
(string-append (assoc-ref inputs "freetype") "0"))))
"/include/freetype2:" (add-after 'unpack 'add-include-directories
(assoc-ref inputs "libxml2") (lambda* (#:key inputs #:allow-other-keys)
"/include/libxml2:" (setenv "CPLUS_INCLUDE_PATH"
(getenv "CPLUS_INCLUDE_PATH"))))) (string-join
;; Prevent deleting the leading / in the __init__.py path in the (list
;; launch script. (search-input-directory inputs "/include/freetype2")
(add-after 'unpack 'disable-unchroot (search-input-directory inputs "/include/libxml2")
(lambda _ (getenv "CPLUS_INCLUDE_PATH"))
(substitute* "setup.py" ":"))))
(("self\\.unchroot") "")))) ;; Prevent deleting the leading / in the __init__.py path in the
;; The setup.py script does not support one of the Python build ;; launch script.
;; system's default flags, "--single-version-externally-managed". (add-after 'unpack 'disable-unchroot
(replace 'install (lambda _
(lambda* (#:key outputs #:allow-other-keys) (substitute* "setup.py"
(invoke "python" "setup.py" "install" (("self\\.unchroot")
(string-append "--prefix=" (assoc-ref outputs "out")) ""))))
"--root=/")))))) ;; The setup.py script does not support one of the Python build
(inputs ;; system's default flags, "--single-version-externally-managed".
(list freetype (delete 'build)
libpng (replace 'install
freeglut (lambda _
glew (invoke "python" "setup.py" "install"
libxml2 (string-append "--prefix=" #$output) "--root=/"))))))
mmtf-cpp (inputs (list freetype
python-pyqt libpng
glm freeglut
netcdf)) glew
(native-inputs (list catch2)) libxml2
mmtf-cpp
python-pyqt
glm
netcdf))
(native-inputs (list cmake-minimal catch2 python-pytest python-setuptools))
(propagated-inputs (list python-numpy))
(home-page "https://pymol.org") (home-page "https://pymol.org")
(synopsis "Molecular visualization system") (synopsis "Molecular visualization system")
(description "PyMOL is a capable molecular viewer and renderer. It can be (description
used to prepare publication-quality figures, to share interactive results with "PyMOL is a capable molecular viewer and renderer. It can be used to
your colleagues, or to generate pre-rendered animations.") prepare publication-quality figures, to share interactive results with your
colleagues, or to generate pre-rendered animations.")
(license license:bsd-3))) (license license:bsd-3)))
(define-public python-pyscf (define-public python-pyscf