diff options
author | Scott Gigante | 2021-01-07 18:51:26 -0500 |
---|---|---|
committer | Scott Gigante | 2021-01-07 18:51:26 -0500 |
commit | 4228972032ec3517f4fe654282d608b0c64e3fd8 (patch) | |
tree | 44db778e22feb8f10c02d1746286fa84936ad6c2 /PKGBUILD | |
download | aur-python-pytorch_spline_conv.tar.gz |
initialize python-pytorch_spline_conv package
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4c5a44a317d4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Scott Gigante <scottgigante@gmail.com> + +_name=torch_spline_conv +_fullname=py$_name +pkgbase=python-$_fullname +pkgname=("python-$_fullname" "python-$_fullname-cuda") +pkgver=1.2.0 +pkgrel=1 +pkgdesc='Implementation of the Spline-Based Convolution Operator of SplineCNN in PyTorch' +arch=(any) +url="https://github.com/rusty1s/$_fullname" +license=(MIT) +depends=(python gcc cuda cmake python-setuptools python-pytest python-pytest-cov python-pytorch) +_tarball="${_name}-${pkgver}.tar.gz" +source=("${url}/archive/${pkgver}.tar.gz") +sha256sums=('ab8da41357c8a4785662366655bb6dc5e84fd0e938008194955409aefe535009') +_srcdir="${_fullname}-${pkgver}" + +prepare() { + export CXX=g++ +} + +build() { + cd $_srcdir + python setup.py build + cd .. +} + +check() { + cd $_srcdir + python setup.py test + cd .. +} + +_package() { + cd $_srcdir + python setup.py bdist_wheel + local site="$pkgdir/usr/lib/$(readlink /bin/python3)/site-packages" + mkdir -p "$site" + unzip "$(ls -1 dist/${_name}-${pkgver}-*.whl)" -d "$site" + rm -r ${site}/test + cd .. +} + + +package_python-pytorch_spline_conv() { + _package +} + + +package_python-pytorch_spline_conv-cuda() { + pkgdesc="Implementation of the Spline-Based Convolution Operator of SplineCNN in PyTorch (with CUDA)" + depends+=(cuda cudnn python-pytorch-cuda) + conflicts=(python-pytorch_spline_conv) + provides=(python-pytorch_spline_conv) + + export CUDA_HOME=/opt/cuda + export PATH=$CUDA_HOME/bin:$PATH + export CPATH=$CUDA_HOME/include:$CPATH + export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH + _package +}
\ No newline at end of file |