summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack O'Connor2023-06-06 20:51:41 -0700
committerJack O'Connor2023-06-06 20:51:41 -0700
commit5e836f953d4a3749574aeb25ad25eeb4ff23a1cf (patch)
treec9ce691eee6a7bf422cdbc9e36c7f3049948acfa
parentc78651d200ad7ba65e3c61f622749debb13c1f2d (diff)
downloadaur-5e836f953d4a3749574aeb25ad25eeb4ff23a1cf.tar.gz
fail the build if a virtualenv is detected
-rw-r--r--PKGBUILD5
1 files changed, 5 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d979254d1bea..b971e1efa7a2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,6 +19,11 @@ sha512sums=('155d8165792935176bf9484b42d6caa715b3c6ff36d266be4d8334fc17a2fdd4a85
ENABLE_NEON_ON_ARMv7=0
prepare() {
+ if [[ -n "$VIRTUAL_ENV" ]]; then
+ echo 'ERROR: $VIRTUAL_ENV is set, which means the build is running in a virtual Python environment.'
+ echo 'ERROR: Rerun the build in a fresh terminal, using the default/system Python environment.'
+ exit 1
+ fi
if [[ $CARCH = 'aarch64' || ( "$CARCH" = 'armv7h' && "$ENABLE_NEON_ON_ARMv7" -ne 0 ) ]]; then
cd "blake3-py-${pkgver}"
echo -e '[tool.maturin]\ncargo-extra-args = "--features neon"' >> pyproject.toml