# Maintainer: Carlos Aznarán _base=monty pkgname=python-${_base} pkgdesc="Missing complement to Python" pkgver=2023.8.7 pkgrel=1 arch=(x86_64) url="https://github.com/materialsvirtuallab/${_base}" license=(MIT) depends=(python) makedepends=(python-build python-installer python-setuptools python-wheel) checkdepends=(python-pytest python-bson python-pandas python-pydantic python-ruamel-yaml python-tqdm python-pytorch) source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz) sha512sums=('6eace4d670ed1e287f62735bc6c58f8a94b6f90fc3e61e2c550699f25bfc2c532ccc4186a7a6e4839e6f41c924e1aba37d4b4793335c70f71aa7ded283059a97') 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 -k 'not reverse_readfile_gz and not Path_objects and not zopen and not zpath' } package() { cd ${_base}-${pkgver} PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl install -Dm 644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}" }