aports/testing/xonsh/APKBUILD
2024-07-20 21:52:35 +00:00

69 lines
1.9 KiB
Plaintext

# Contributor: Hoang Nguyen <folliekazetani@protonmail.com>
# Contributor: vinnie <fz12345@gmail.com>
# Maintainer: vinnie <fz12345@gmail.com>
pkgname=xonsh
pkgver=0.18.2
pkgrel=0
pkgdesc="Python-powered, cross-platform, Unix-gazing shell"
url="https://xon.sh"
arch="noarch"
license="BSD-2-Clause"
depends="
py3-distro
py3-prompt_toolkit>=3.0
py3-pygments>=2.2
py3-pyperclip
py3-ujson
"
makedepends="py3-setuptools py3-gpep517 py3-installer py3-wheel"
# man-db with groff-1.23.0 breaks "test_man.py" due to escape codes in output
checkdepends="
mandoc
py3-pip
py3-pyte
py3-pytest
py3-pytest-mock
py3-pytest-rerunfailures
py3-pytest-subprocess
py3-pytest-timeout
py3-requests
py3-virtualenv
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/xonsh/xonsh/archive/$pkgver.tar.gz
no-col.patch
"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest \
--ignore=tests/test_integrations.py \
--ignore=tests/test_pipelines.py \
--ignore=tests/test_ptk_shell.py \
--ignore=tests/completers/test_bash_completer.py \
--ignore=tests/procs/test_specs.py \
--deselect tests/test_man.py::test_man_completion
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
# The build process appends dirty bit into the version string
# if a git repo is detected
sed -i "s/^\(__version__ =\).*/\1 \"$pkgver\"/" \
"$pkgdir"/usr/lib/python*/site-packages/xonsh/__init__.py
}
sha512sums="
27d8172f777c2587bb64b74bd8c0d3b0939aae3d35a06124ed9a4b21b29cebebc1df35832fae85ba4ba5d45909a961b24a8f4d73e564ad6ae90f04f1cb94700a xonsh-0.18.2.tar.gz
56e6548dde6faaa70e000f0d49a260ca0fe5297b0ec0abb1ab2cb0c22154479a957155f06037b91d9fda3736f3c7935d019a6c45adf506334e5940dfd8ac37d1 no-col.patch
"