2 # Contributor: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Stéphane Gaudreault <stephane@archlinux.org>
9 pkgdesc="Python wrapper for Nvidia CUDA"
11 url="https://documen.tician.de/pycuda/"
38 provides=(pycuda-headers)
39 conflicts=(pycuda-headers)
40 replaces=(pycuda-headers)
41 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
42 sha512sums=('c62aafe473e44339ac2147d86b51fc9bc2429310450b6d99e78a127828cc3a42dc74f20e1bdf8261f6652aed6d07ee3a871ce371f89f33fbcc4014f551af0b96')
43 b2sums=('d60e83ac2faa183e0fa022c3d901c9d97ec2f9a59195425b9d71467c24b154d48d5735223220b41aa58b0898800d382d9ead54166d0a59db9c2a777e03e574be')
47 [[ "$CARCH" = "x86_64" ]] && lib_arch='64'
49 # create local siteconf.py for build system
50 # defaults can be compared from running the ./configure.py script
52 printf "BOOST_PYTHON_LIBNAME = ['boost_python3']\n"
53 printf "CUDA_ROOT = '/opt/cuda'\n"
54 printf "USE_SHIPPED_BOOST = False\n"
55 } > $_name-$pkgver/siteconf.py
57 # we ship python-numpy
58 sed -e 's/oldest-supported-numpy/numpy/' -i $_name-$pkgver/pyproject.toml
63 python -m build --wheel --no-isolation
66 # requires an Nvidia graphics card to run
68 # local pytest_options=(
70 # --ignore examples/from-wiki/simple_speed_test.py
72 # local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
75 # # install to temporary location, as importlib is used
76 # python -m installer --destdir=test_dir dist/*.whl
77 # export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
78 # pytest "${pytest_options[@]}"
83 python -m installer --destdir="$pkgdir" dist/*.whl
84 install -vDm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/