blob: 857654079fba78a346f91a85dbd230e38dfd9245 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=nbQA
pkgname=${_base,,}
pkgdesc="Run any standard Python code quality tool on a Jupyter Notebook"
pkgver=1.9.1
pkgrel=1
arch=(any)
url="https://github.com/${_base}-dev/${_base}"
license=(MIT)
depends=(autopep8 ipython python-tokenize-rt python-tomli)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest python-jupytext python-black blacken-docs flake8 python-pydocstyle
python-autoflake python-isort mdformat mypy python-pylint pyupgrade ruff yapf)
optdepends=('python-black: toolchain support'
'blacken-docs: toolchain support'
'flake8: toolchain support'
'python-isort: toolchain support'
'python-jupytext: toolchain support'
'mypy: toolchain support'
'python-pylint: toolchain support'
'pyupgrade: toolchain support'
'ruff: toolchain support')
source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('2417c3bcf71941968103745e33116560113db6b2a9f5b99c12980f21e0a1d5b2771cf8299e5199376280782c08ff4ea722af51601ef12fc6911b577d8f0bbc8c')
build() {
cd ${_base}-${pkgver}
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd ${_base}-${pkgver}
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest tests \
--ignore=tests/test_return_code.py \
--ignore=tests/test_version.py \
--ignore=tests/tools/test_ruff_works.py \
-k 'not successive_runs_using_black'
}
package() {
cd ${_base}-${pkgver}
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|