diff options
author | Luca Weiss | 2021-06-13 10:02:35 +0200 |
---|---|---|
committer | Luca Weiss | 2021-06-13 10:02:35 +0200 |
commit | 3b762b6e32341c70ee0b5127c1053cad96f8eb0a (patch) | |
tree | 3e8990c604e2790b5c1e02ce12b10c4187df89b2 | |
parent | f0ef076d8cbaf87ca9761565daf099c4ab99be75 (diff) | |
download | aur-3b762b6e32341c70ee0b5127c1053cad96f8eb0a.tar.gz |
openrazer: add python sanity check
Hopefully less issue reports because of weird python setups in the
future...
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 10 |
2 files changed, 10 insertions, 1 deletions
@@ -41,4 +41,3 @@ pkgname = openrazer-meta optdepends = polychromatic: frontend optdepends = razergenie: qt frontend optdepends = razercommander: gtk frontend - @@ -13,6 +13,16 @@ makedepends=('python-setuptools') source=("https://github.com/openrazer/openrazer/releases/download/v$pkgver/openrazer-$pkgver.tar.xz") sha256sums=('b27a7ab459e5290f9fe4d56f49922f97ed83fc92ba2bc0154aff8c4cdd1de73f') +prepare() { + # Do a sanity check in the environment of the builder so the build process doesn't place files into a wrong directory. + # If you think this is incorrect you can always remove this from the PKGBUILD, but then please don't complain if it doesn't work. + if [ "$(which python3)" != "/usr/bin/python3" ]; then + echo "ERROR: Your 'python3' does not point to /usr/bin/python3 but to $(which python3), likely a custom environment like anaconda." + echo "Please build this package in a clean chroot (e.g. with https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot) or point your PATH variable to prefer /usr/bin/ temporarily." + return 1 + fi +} + package_python-openrazer() { pkgdesc="Python library for accessing the Razer daemon from Python." depends=('openrazer-daemon' 'python-numpy') |