aur/python-matplotx to 0.3.10-1

This commit is contained in:
graysky 2022-08-23 04:29:34 -04:00
parent 8bb76a2428
commit 7e33b7dc41

View file

@ -7,34 +7,25 @@
_base=matplotx
pkgname=python-${_base}
pkgdesc="Useful styles and extensions for Matplotlib"
pkgver=0.3.7
pkgver=0.3.10
pkgrel=1
arch=(any)
url="https://github.com/nschloe/${_base}"
license=(MIT)
depends=(python-matplotlib)
makedepends=(python-build python-flit-core python-install)
makedepends=(python-setuptools)
optdepends=('python-networkx: for creation of graphs'
'python-pypng: for iterator support')
source=(https://pypi.org/packages/source/${_base::1}/${_base}/${_base}-${pkgver}.tar.gz)
sha512sums=('527a92863e9de5dbff70625afc693e814e8d34d16f48c25d437d8eba6dcf094e71f742a8af5c4281d09e6908f331b25bbd55b98290352a2d68ea31fc7063969f')
source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
sha512sums=('33eea6fe855915b45c490c02ce4fb45fecdae9e090e9ff1438620d4f898143e0dd27341493124a364d30aca1a39c2da9d3547555a57dcc45dd72144897c825b5')
build() {
cd "${_base}-${pkgver}"
export PYTHONHASHSEED=0
python -m build --wheel --skip-dependency-check --no-isolation
cd ${_base}-${pkgver}
python -c "from setuptools import setup; setup();" build
}
package() {
cd "${_base}-${pkgver}"
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m install --optimize=1 --destdir="${pkgdir}" dist/*.whl
# https://github.com/FFY00/python-install/pull/6
chmod +x ${pkgdir}/usr/bin/*
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s "${site_packages}/${_base}-$pkgver.dist-info/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd ${_base}-${pkgver}
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -c "from setuptools import setup; setup();" install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}