Sven-Hendrik Haase pushed to branch main at Arch Linux / Packaging / Packages / 
python-pycuda


Commits:
76fbdeb3 by racehd at 2025-10-20T20:40:55+00:00
Fix missing compyte submodule by using git source

GitHub's auto-generated release tarballs don't include git submodule
contents, causing `ModuleNotFoundError: No module named pycuda.compyte`.

Switch to git source with submodule initialization, matching approach
used by python-pyopencl. The bpl-subset submodule is not needed since
the package already depends on boost.

Related: https://github.com/inducer/pycuda/issues/339

- - - - -


1 changed file:

- PKGBUILD


Changes:

=====================================
PKGBUILD
=====================================
@@ -6,7 +6,7 @@
 _name=pycuda
 pkgname=python-pycuda
 pkgver=2025.1.2
-pkgrel=2
+pkgrel=3
 pkgdesc="Python wrapper for Nvidia CUDA"
 arch=(x86_64)
 url="https://documen.tician.de/pycuda/";
@@ -27,6 +27,7 @@ depends=(
 makedepends=(
   boost
   ctags
+  git
   mesa
   python-build
   python-installer
@@ -39,11 +40,19 @@ checkdepends=(
 provides=(pycuda-headers)
 conflicts=(pycuda-headers)
 replaces=(pycuda-headers)
-source=($_name-$pkgver.tar.gz::https://github.com/inducer/pycuda/archive/refs/tags/v$pkgver.tar.gz)
-sha512sums=('6d71d17ce03c95f7e5663a16110a6ab76b0c3aa3b8147242649ecb69439f6f3ca78ba60f026d8929a8d991b27eaf0e85dbb88825e3416ada747cab702f09aaf0')
-b2sums=('8d3ad8325e829b83ec44bea48415625a4ec78b9fa8b19cac04044801d68dd887f93ad30967314668f3ff7a17ee95ed23f530e3b540dd3acd81e7a5ec0e9e74c6')
+source=("git+https://github.com/inducer/pycuda.git#tag=v${pkgver}";
+        git+https://github.com/inducer/compyte)
+sha512sums=('5aca325c694ca16bfd522ba47adcdd138080241832db118684008e9e63c36b456ca63f94428cfc32323fc3f2a98ee1c2b8f1c60a76eb58ee2771d63faf5e0fbe'
+            'SKIP')
+b2sums=('0e2b556e586f5267994b81125b1a7d3f84b4a72618b9acd4e2fa941d9ddad87d3121028d658b680787bd3ea0e0e6b8e394edea8d6c0f02cad7562094a16de564'
+        'SKIP')
 
 prepare() {
+  cd $_name
+  git submodule init
+  git config submodule.pycuda/compyte.url ../compyte
+  git -c protocol.file.allow=always submodule update
+
   local lib_arch=''
   [[ "$CARCH" = "x86_64" ]] && lib_arch='64'
 
@@ -53,14 +62,14 @@ prepare() {
     printf "BOOST_PYTHON_LIBNAME = ['boost_python3']\n"
     printf "CUDA_ROOT = '/opt/cuda'\n"
     printf "USE_SHIPPED_BOOST = False\n"
-  } > $_name-$pkgver/siteconf.py
+  } > siteconf.py
 
   # we ship python-numpy
-  sed -e 's/oldest-supported-numpy/numpy/' -i $_name-$pkgver/pyproject.toml
+  sed -e 's/oldest-supported-numpy/numpy/' -i pyproject.toml
 }
 
 build() {
-  cd $_name-$pkgver
+  cd $_name
   python -m build --wheel --no-isolation
 }
 
@@ -72,7 +81,7 @@ build() {
 #   )
 #   local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
 
-#   cd $_name-$pkgver
+#   cd $_name
 #   # install to temporary location, as importlib is used
 #   python -m installer --destdir=test_dir dist/*.whl
 #   export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
@@ -80,7 +89,7 @@ build() {
 # }
 
 package() {
-  cd $_name-$pkgver
+  cd $_name
   python -m installer --destdir="$pkgdir" dist/*.whl
   install -vDm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
 }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-pycuda/-/commit/76fbdeb38f09849b517ee6c394200abcbfbb72ef

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-pycuda/-/commit/76fbdeb38f09849b517ee6c394200abcbfbb72ef
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to