mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 19:55:26 +03:00
60 lines
1.9 KiB
Text
60 lines
1.9 KiB
Text
# Contributor: messense <messense@icloud.com>
|
|
# Maintainer: messense <messense@icloud.com>
|
|
pkgname=py-spy
|
|
pkgver=0.3.14
|
|
pkgrel=0
|
|
pkgdesc="Sampling profiler for Python programs"
|
|
url="https://github.com/benfred/py-spy"
|
|
arch="aarch64 armv7 armhf x86_64 ppc64le" # limited by rust
|
|
license="MIT"
|
|
makedepends="cargo zlib-dev libunwind-dev xz-dev"
|
|
checkdepends="python3 bash"
|
|
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"
|
|
|
|
build() {
|
|
cargo build --release --locked
|
|
|
|
./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"
|
|
|
|
# Some tests need additional privileges
|
|
cargo test --release --locked -- \
|
|
--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/completions/$pkgname.fish
|
|
install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
|
|
}
|
|
|
|
sha512sums="
|
|
f079b002248a033eac3b93723fd267e6cbdb415ac3172ace0d14eb9cd87a1e4adf471eeec641f9644abe8a4fab43b48db7440b4b1242ea18e02bcc574104d303 py-spy-0.3.14.tar.gz
|
|
"
|