Package Details: python-pyglm 2.7.3-1

Git Clone URL: https://aur.archlinux.org/python-pyglm.git (read-only, click to copy)
Package Base: python-pyglm
Description: OpenGL Mathematics library for Python
Upstream URL: https://github.com/Zuzu-Typ/PyGLM
Licenses: zlib
Submitter: ahmubashshir
Maintainer: ahmubashshir
Last Packager: ahmubashshir
Votes: 3
Popularity: 0.29
First Submitted: 2021-09-03 15:22 (UTC)
Last Updated: 2024-10-28 05:17 (UTC)

Latest Comments

groctel commented on 2025-04-01 14:07 (UTC) (edited on 2025-04-11 08:45 (UTC) by groctel)

This failure is blocking the dependencies for python-moderngl-window. I've taken a look at the PKGBUILD and I've produced a patch to fix this and other things:

diff --git a/PKGBUILD b/PKGBUILD
index b31da77..13f09cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,41 +3,28 @@
 # what: PyGLM

 pkgname='python-pyglm'
-pkgver='2.7.3'
+pkgver='2.8.2'
 pkgrel=1
 pkgdesc="OpenGL Mathematics library for Python"
 url="https://github.com/Zuzu-Typ/PyGLM"
-depends=('python')
-makedepends=('python-setuptools' 'git')
-license=('ZLIB')
-arch=('any')
-source=(
-    "$pkgname::git+https://github.com/Zuzu-Typ/PyGLM.git#tag=$pkgver"
-    "pyglm-typing::git+https://github.com/esoma/pyglm-typing.git"
-    "glm::git+https://github.com/Zuzu-Typ/glm.git"
+depends=('glm-git' 'python')
+makedepends=(
+    'python-build'
+    'python-installer'
+    'python-setuptools'
+    'python-wheel'
 )
-sha256sums=('b9b968b15859d8e40502c935dd77a9851c7710e0d0841a73d7390df634099c47'
-            'SKIP'
-            'SKIP')
-
-prepare() {
-    local mod
-
-    cd "$srcdir/$pkgname"
-    git submodule init
-    for mod in glm pyglm-typing; do
-        git config "submodule.$mod.url" "$srcdir/$mod"
-    done
-
-    git -c protocol.file.allow=always submodule update
-}
+license=('Zlib')
+arch=('x86_64')
+source=("$pkgname::git+https://github.com/Zuzu-Typ/PyGLM.git#tag=$pkgver")
+sha256sums=('d26ecc224b11b12fc4d90465917dbac966448bec6245bebe09d004b0e0ae2c67')

 build() {
     cd "$srcdir/$pkgname"
-    CFLAGS="$CFLAGS -Wno-all" python setup.py build
+    CFLAGS="$CFLAGS -Wno-all" python -m build --wheel --no-isolation
 }

 package() {
     cd "$srcdir/$pkgname"
-    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    python -m installer --destdir="$pkgdir" --compile-bytecode=1 dist/*.whl
 }

This fixes the following things:

  • Bumps the pkgver to the latest release.
  • Changes the licence string to an SPDX-compliant one.
  • Changes arch to x86_64 as this builds a binary package.
  • Removes the manual submodule download, instead using the package-provided ones.
  • Removes prepare() as it's not required as per last point.

UPDATE: After discussing it with the PyGLM developer, I updated the patch to also include these improvements:

  • Updates to 2.8.2 (original patch was 2.8.1).
  • Upgrades Python build system to not use setup.py.

Cheers!

ahmubashshir commented on 2024-11-16 08:13 (UTC)

that specific commit was removed from upstream

fbc534be6

Does anyone know how to fix this?

TotoShampoin commented on 2024-10-30 07:18 (UTC) (edited on 2024-10-30 07:19 (UTC) by TotoShampoin)

It errors, outputting this:
fatal: Fetched in submodule path 'glm', but it did not contain fbc534be62f8c785db989f8ae7526edf6d0dc306. Direct fetching of that commit failed.

Any clue what that might be?

saltedcoffii commented on 2022-12-01 14:55 (UTC)

PyGLM 2.6.0 fails to build. This fatal error happens during the build step:

Traceback (most recent call last):
  File "/tmp/makepkg/python-pyglm/src/PyGLM-2.6.0/setup.py", line 33, in <module>
    shutil.copy2("pyglm-typing/src/glm_typing/__init__.py", "glm-stubs/glm_typing.py")
  File "/usr/lib/python3.10/shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'pyglm-typing/src/glm_typing/__init__.py'