me
/
guix
Archived
1
0
Fork 0

gnu: python-glcontext: Update to 2.4.0-0.beebc1f.

* gnu/packages/python-xyz.scm (python-glcontext): Explicitly refer to commit
instead of mutable Git tag.
master
Simon Tournier 2023-09-15 17:48:42 +02:00
parent 3a7a81b471
commit 5bae1fea20
No known key found for this signature in database
GPG Key ID: 92F1D22C608EE7E5
1 changed files with 52 additions and 48 deletions

View File

@ -23051,55 +23051,59 @@ library.")
"This is the Cython-coded accelerator module for PyOpenGL."))) "This is the Cython-coded accelerator module for PyOpenGL.")))
(define-public python-glcontext (define-public python-glcontext
(package (let (;; Upstream is known for abusing mutable tag, hence pinpoint the
(name "python-glcontext") ;; relevant commit.
(version "2.4.0") (revision "0")
(source (origin (commit "beebc1fd08ee850f06f4390be4b280824e383074"))
(method git-fetch) (package
(uri (git-reference (name "python-glcontext")
(url "https://github.com/moderngl/glcontext") (version (git-version "2.4.0" revision commit))
(commit version))) (source (origin
(file-name (git-file-name name version)) (method git-fetch)
(sha256 (uri (git-reference
(base32 (url "https://github.com/moderngl/glcontext")
"0zzpwyqg19y600n09xz07cxk4jimh9vjraszda7g7ipijq6iasac")))) (commit commit)))
(build-system pyproject-build-system) (file-name (git-file-name name version))
(arguments (sha256
(list #:phases #~(modify-phases %standard-phases (base32
(add-before 'build 'fix-lib-paths "0zzpwyqg19y600n09xz07cxk4jimh9vjraszda7g7ipijq6iasac"))))
(lambda* (#:key inputs outputs #:allow-other-keys) (build-system pyproject-build-system)
(let ((mesa (assoc-ref inputs "mesa")) (arguments
(libx11 (assoc-ref inputs "libx11"))) (list #:phases #~(modify-phases %standard-phases
(substitute* '("glcontext/x11.cpp" (add-before 'build 'fix-lib-paths
"glcontext/egl.cpp") (lambda* (#:key inputs outputs #:allow-other-keys)
(("\"libGL.so\"") (let ((mesa (assoc-ref inputs "mesa"))
(string-append "\"" mesa "/lib/libGL.so\"")) (libx11 (assoc-ref inputs "libx11")))
(("\"libEGL.so\"") (substitute* '("glcontext/x11.cpp"
(string-append "\"" mesa "/lib/libEGL.so\"")) "glcontext/egl.cpp")
(("\"libX11.so\"") (("\"libGL.so\"")
(string-append "\"" libx11 "/lib/libX11.so\""))) (string-append "\"" mesa "/lib/libGL.so\""))
(substitute* '("glcontext/__init__.py") (("\"libEGL.so\"")
(("find_library\\('GL'\\)") (string-append "\"" mesa "/lib/libEGL.so\""))
(string-append "'" mesa "/lib/libGL.so'")) (("\"libX11.so\"")
(("find_library\\('EGL'\\)") (string-append "\"" libx11 "/lib/libX11.so\"")))
(string-append "'" mesa "/lib/libEGL.so'")) (substitute* '("glcontext/__init__.py")
(("find_library\\(\"X11\"\\)") (("find_library\\('GL'\\)")
(string-append "'" libx11 "/lib/libX11.so'")))))) (string-append "'" mesa "/lib/libGL.so'"))
(replace 'check (("find_library\\('EGL'\\)")
(lambda* (#:key inputs outputs tests? (string-append "'" mesa "/lib/libEGL.so'"))
#:allow-other-keys) (("find_library\\(\"X11\"\\)")
(when tests? (string-append "'" libx11 "/lib/libX11.so'"))))))
(system "Xvfb :1 &") (replace 'check
(setenv "DISPLAY" ":1") (lambda* (#:key inputs outputs tests?
(add-installed-pythonpath inputs outputs) #:allow-other-keys)
(invoke "pytest" "tests"))))))) (when tests?
(inputs (list libx11 mesa)) (system "Xvfb :1 &")
(native-inputs (list xorg-server-for-tests python-pytest python-psutil)) (setenv "DISPLAY" ":1")
(home-page "https://github.com/moderngl/glcontext") (add-installed-pythonpath inputs outputs)
(synopsis "Portable OpenGL Context for ModernGL") (invoke "pytest" "tests")))))))
(description "Python-glcontext is a library providing an OpenGL (inputs (list libx11 mesa))
(native-inputs (list xorg-server-for-tests python-pytest python-psutil))
(home-page "https://github.com/moderngl/glcontext")
(synopsis "Portable OpenGL Context for ModernGL")
(description "Python-glcontext is a library providing an OpenGL
implementation for ModernGL on multiple platforms.") implementation for ModernGL on multiple platforms.")
(license license:expat))) (license license:expat))))
(define-public python-rencode (define-public python-rencode
(package (package