summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Velykoivanenko2019-12-05 10:52:35 +0100
committerLev Velykoivanenko2019-12-05 10:52:35 +0100
commitc441e84b3e782e5f7eb692f1ed9241d2d7ae1c70 (patch)
treec83b27bffe54a8418b852feb8886d1b0f818657e
parentb519ae2ff6ec78256fd000478739cadb163f807c (diff)
downloadaur-c441e84b3e782e5f7eb692f1ed9241d2d7ae1c70.tar.gz
Updated package version to 19.18
Added check() function. Added optional dependencies for check() function.
-rwxr-xr-x.SRCINFO12
-rwxr-xr-xPKGBUILD25
2 files changed, 27 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9c384d0347c6..8f86fdaa59e5 100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-dlib-cuda
pkgdesc = Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques.
- pkgver = 19.17
+ pkgver = 19.18
pkgrel = 1
url = http://www.dlib.net/
arch = x86_64
@@ -22,15 +22,17 @@ pkgbase = python-dlib-cuda
optdepends = neon: for neon support
optdepends = sqlite: for sqlite support
optdepends = ccache-ext: for ccache support during compiling
- source = http://dlib.net/files/dlib-19.17.tar.bz2
- sha256sums = 24772f9b2b99cf59a85fd1243ca1327cbf7340d83395b32a6c16a3a16136327b
+ optdepends = python-numpy: for running numpy based tests
+ optdepends = python2-numpy: for running numpy based tests
+ source = http://dlib.net/files/dlib-19.18.tar.bz2
+ sha256sums = 521b9fbcb90c328063c439f6ccb3c95d9ababd25b208cbd1b915d9f5c4d2ab9b
pkgname = python-dlib-cuda
depends = python
depends = cuda
depends = cudnn
depends = libx11
- provides = python-dlib=19.17
+ provides = python-dlib=19.18
conflicts = python-dlib
pkgname = python2-dlib-cuda
@@ -38,6 +40,6 @@ pkgname = python2-dlib-cuda
depends = cuda
depends = cudnn
depends = libx11
- provides = python2-dlib=19.17
+ provides = python2-dlib=19.18
conflicts = python2-dlib
diff --git a/PKGBUILD b/PKGBUILD
index d693695d501c..62e830d44d96 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
pkgname=('python-dlib-cuda' 'python2-dlib-cuda')
_pkgname='dlib'
-pkgver=19.17
+pkgver=19.18
pkgrel=1
pkgdesc="Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques."
arch=('x86_64')
@@ -24,9 +24,11 @@ optdepends=('cblas: for BLAS support'
'libpng: for PNG support'
'neon: for neon support'
'sqlite: for sqlite support'
- 'ccache-ext: for ccache support during compiling')
+ 'ccache-ext: for ccache support during compiling'
+ 'python-numpy: for running numpy based tests'
+ 'python2-numpy: for running numpy based tests')
source=("http://dlib.net/files/${_pkgname}-${pkgver}.tar.bz2")
-sha256sums=('24772f9b2b99cf59a85fd1243ca1327cbf7340d83395b32a6c16a3a16136327b')
+sha256sums=('521b9fbcb90c328063c439f6ccb3c95d9ababd25b208cbd1b915d9f5c4d2ab9b')
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
@@ -34,7 +36,7 @@ build() {
_compiler_opts=()
# Detecting whether certain cpu optimisations can be made
# Note: from dlib version 19.17 the default is to enable all options, so this
- # is a check if they need to be turned off
+ # is a check if they need to be turned off
if ! grep -q avx /proc/cpuinfo; then
_compiler_opts+=( '--no' 'USE_AVX_INSTRUCTIONS' )
fi
@@ -58,7 +60,7 @@ build() {
_compiler_vars=()
if [[ -f "/usr/lib/ccache/bin/nvcc-ccache" ]]; then
_compiler_vars+=( '--set' 'CUDA_NVCC_EXECUTABLE=/usr/lib/ccache/bin/nvcc-ccache' )
- _compiler_vars+=( '--set' 'CUDA_HOST_COMPILER=/usr/lib/ccache/bin/gcc-7' )
+ _compiler_vars+=( '--set' 'CUDA_HOST_COMPILER=/usr/lib/ccache/bin/gcc' )
else
_compiler_vars+=( '--set' 'CUDA_HOST_COMPILER=/opt/cuda/bin/gcc' )
fi
@@ -70,6 +72,19 @@ build() {
python2 setup.py build "${_compiler_opts[@]}" "${_compiler_vars[@]}"
}
+
+check() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ # The PYTHONPATH is cleared to avoid custom user paths getting in the way
+ # of importing the right versions of packages
+ # Tests for Python 3
+ PYTHONPATH="" python setup.py test
+
+ # Tests for Python 2
+ PYTHONPATH="" python2 setup.py test
+}
+
package_python-dlib-cuda() {
depends=('python' 'cuda' 'cudnn' 'libx11')
provides=("python-dlib=$pkgver")