~ruther/guix-local

ea4e755f69828ef88754c9a7029681822a974b7d — Nicolas Graves 6 months ago 5f4fc7c
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>
1 files changed, 53 insertions(+), 46 deletions(-)

M gnu/packages/chemistry.scm
M gnu/packages/chemistry.scm => gnu/packages/chemistry.scm +53 -46
@@ 720,7 720,7 @@ quantum chemistry (and molecular mechanics) softwares.")
(define-public python-pymol
  (package
    (name "python-pymol")
    (version "2.5.0")
    (version "3.1.0")
    (source
     (origin
       (method git-fetch)


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

(define-public python-pyscf