diff options
Diffstat (limited to 'testing/py-spy/APKBUILD')
-rw-r--r-- | testing/py-spy/APKBUILD | 64 |
1 files changed, 45 insertions, 19 deletions
diff --git a/testing/py-spy/APKBUILD b/testing/py-spy/APKBUILD index e804b92485a..d0ace8e67b4 100644 --- a/testing/py-spy/APKBUILD +++ b/testing/py-spy/APKBUILD @@ -1,38 +1,64 @@ # Contributor: messense <messense@icloud.com> # Maintainer: messense <messense@icloud.com> pkgname=py-spy -pkgver=0.3.8 -pkgrel=0 +pkgver=0.3.14 +pkgrel=3 pkgdesc="Sampling profiler for Python programs" url="https://github.com/benfred/py-spy" -arch="aarch64 armv7 armhf x86_64 ppc64le" # limited by rust +arch="aarch64 x86_64 ppc64le" # limited by rust license="MIT" -makedepends="cargo zlib-dev libunwind-dev xz-dev" +makedepends="cargo zlib-dev libunwind-dev xz-dev cargo-auditable" checkdepends="python3 bash" -subpackages="$pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/benfred/py-spy/archive/v$pkgver.tar.gz" +subpackages=" + $pkgname-doc + $pkgname-bash-completion + $pkgname-fish-completion + $pkgname-zsh-completion + " +source="$pkgname-$pkgver.tar.gz::https://github.com/benfred/py-spy/archive/v$pkgver.tar.gz + $pkgname-fix-check.patch::https://github.com/benfred/py-spy/commit/e6053b5f6f7440451ed0c7607ec1431fa17d972a.diff + " + +prepare() { + default_prepare + + cargo fetch --target="$CTARGET" --locked +} build() { - cargo build --release --locked + cargo auditable build --release --frozen + + ./target/release/py-spy completions bash > $pkgname.bash + ./target/release/py-spy completions fish > $pkgname.fish + ./target/release/py-spy completions zsh > $pkgname.zsh } check() { - # enable interpreter "python" hack - mkdir "$builddir"/pythonbindir - ln -s /usr/bin/python3 "$builddir"/pythonbindir/python - export PATH="$PATH:$builddir/pythonbindir" - - case "$CARCH" in - # py-spy requires additional permissions when running in docker - # see https://github.com/benfred/py-spy#how-do-i-run-py-spy-in-docker - aarch64 | armv7 | armhf) cargo test --release --locked --no-run ;; - *) cargo test --release --locked ;; - esac + # Some tests need additional privileges + cargo test --frozen -- \ + --skip test_busy_loop \ + --skip test_delayed_subprocess \ + --skip test_local_vars \ + --skip test_long_sleep \ + --skip test_negative_linenumber_increment \ + --skip test_recursive \ + --skip test_subprocesses \ + --skip test_subprocesses_zombiechild \ + --skip test_thread_names \ + --skip test_thread_reuse \ + --skip test_unicode } package() { install -Dm0755 target/release/$pkgname -t "$pkgdir"/usr/bin install -Dm0644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname + install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish + install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } -sha512sums="38d930fc34ea5de391e07b9408e428fcfc7d3be8be7b5d182bf491b4aae5fd7802fe644c3e66af6bac64f3ed3077a50b0ddd32040ac167689afd4f4cd9dec5b7 py-spy-0.3.8.tar.gz" +sha512sums=" +f079b002248a033eac3b93723fd267e6cbdb415ac3172ace0d14eb9cd87a1e4adf471eeec641f9644abe8a4fab43b48db7440b4b1242ea18e02bcc574104d303 py-spy-0.3.14.tar.gz +2b927080cd953facc47994b665bfa3d1c47552b549673b11b047db21bc773a53d10faffd26482c3f9825fae8f0f87d387cb9e602898288cf88b7d5a0a8589eb3 py-spy-fix-check.patch +" |