diff options
author | bartus | 2021-06-19 08:25:23 +0200 |
---|---|---|
committer | bartus | 2021-06-19 08:25:23 +0200 |
commit | 2f9dfa4a334283ab2c6d5edd7658776af17d6fe2 (patch) | |
tree | 69bd7c10cb960189266309625a505b88c25a9e70 | |
parent | 9680b9359eae0ea65c8b7711ad5469f029874b12 (diff) | |
download | aur-2f9dfa4a334283ab2c6d5edd7658776af17d6fe2.tar.gz |
Add optional python2 module.
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 9 |
2 files changed, 9 insertions, 1 deletions
@@ -15,6 +15,7 @@ pkgbase = openexr2 depends = zlib optdepends = boost-libs: python support optdepends = python: python support + optdepends = python2: python2 support provides = openexr=2.5.5 conflicts = openexr source = openexr2-2.5.5.tar.gz::https://github.com/openexr/openexr/archive/v2.5.5.tar.gz @@ -9,7 +9,7 @@ arch=('x86_64') license=('BSD') depends=('zlib') makedepends=('cmake' 'patchelf' 'python' 'boost' 'freeglut' 'python-numpy' 'chrpath') -optdepends=('boost-libs: python support' 'python: python support') +optdepends=('boost-libs: python support' 'python: python support' 'python2: python2 support') conflicts=('openexr') provides=("openexr=${pkgver}") source=("$pkgname-$pkgver.tar.gz::https://github.com/openexr/openexr/archive/v$pkgver.tar.gz") @@ -29,4 +29,11 @@ package() { _pythonpath=$(python -c "from sysconfig import get_path; print(get_path('platlib'))") install -Dm755 build/python3*/imathnumpy.so -t "$pkgdir/$_pythonpath" patchelf --set-rpath "" "${pkgdir}/$_pythonpath"/imathnumpy.so + +# Install optional python2 module + compgen -G "build/python2*/imathnumpy.so" && { + _python2path=$(python2 -c "from sysconfig import get_path; print(get_path('platlib'))") + install -Dm755 build/python2*/imathnumpy.so -t "$pkgdir/$_python2path" + patchelf --set-rpath "" "${pkgdir}/$_python2path"/imathnumpy.so + } } |