diff options
author | Erich Eckner <git@eckner.net> | 2023-01-15 21:12:47 +0100 |
---|---|---|
committer | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-01-18 10:15:05 +0100 |
commit | 456d3199b07db2e4f0ee474771cca7d56efd74a4 (patch) | |
tree | 165cf6a5a01316c671cfdfc7b9521cf459e07e7e /python-pyinstrument/PKGBUILD | |
parent | ccabb1310d15241464a5b1577c9e1c9fe9744fea (diff) | |
download | archlinuxewe-456d3199b07db2e4f0ee474771cca7d56efd74a4.tar.xz |
python-pyinstrument new
Diffstat (limited to 'python-pyinstrument/PKGBUILD')
-rw-r--r-- | python-pyinstrument/PKGBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/python-pyinstrument/PKGBUILD b/python-pyinstrument/PKGBUILD new file mode 100644 index 000000000..0a808a374 --- /dev/null +++ b/python-pyinstrument/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +# Contributor: Luis Martinez <luis dot martinez at disroot dot org> +# Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com> + +pkgname=python-pyinstrument +_pkg="${pkgname#python-}" +pkgver=4.1.1 +pkgrel=2 +pkgdesc="Call stack profiler for Python" +arch=('x86_64') +url="https://github.com/joerick/pyinstrument" +license=('BSD') +depends=('python>=3.7') +makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') +# checkdepends=( +# 'python-pytest' +# 'python-pytest-asyncio' +# 'python-flaky' +# 'python-trio' +# 'python-django' +# 'python-sphinx' +# 'python-myst-parser' +# 'python-greenlet') +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkg::1}/$_pkg/$_pkg-$pkgver.tar.gz") +sha256sums=('1dc2791d2cd2fd3459cb55010004a5cc2a9a8b4625a0cbea45a4b1aebbe2c3a2') + +build() { + cd "$_pkg-$pkgver" + python -m build --wheel --no-isolation +} + +# check() { +# cd "$_pkg-$pkgver" +# local _ver="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" +# PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_ver" pytest -x +# } + +package() { + cd "$_pkg-$pkgver" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl + install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/" + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" +} |