mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
97 lines
2.7 KiB
Plaintext
97 lines
2.7 KiB
Plaintext
# Contributor: Isaac Dunham <ibid.ag@gmail.com>
|
|
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
|
|
pkgname=py3-matplotlib
|
|
_pyname=matplotlib
|
|
pkgver=3.7.1
|
|
pkgrel=0
|
|
pkgdesc="Python3 library for plots"
|
|
url="https://matplotlib.org"
|
|
arch="all"
|
|
license="Python-2.0"
|
|
depends="
|
|
py3-cairo
|
|
py3-certifi
|
|
py3-contourpy
|
|
py3-cycler
|
|
py3-dateutil
|
|
py3-fonttools
|
|
py3-kiwisolver
|
|
py3-numpy
|
|
py3-packaging
|
|
py3-parsing
|
|
py3-pillow
|
|
py3-tz
|
|
python3-tkinter
|
|
"
|
|
makedepends="
|
|
freetype-dev
|
|
gfortran
|
|
libpng-dev
|
|
py3-gobject3
|
|
py3-gpep517
|
|
py3-numpy-dev
|
|
py3-pybind11-dev
|
|
py3-setuptools
|
|
py3-setuptools_scm
|
|
py3-wheel
|
|
python3-dev
|
|
qhull-dev
|
|
tk-dev
|
|
"
|
|
checkdepends="
|
|
font-opensans
|
|
gtk+3.0-dev
|
|
py3-pytest
|
|
py3-pytest-xdist
|
|
"
|
|
subpackages="$pkgname-pyc"
|
|
source="https://github.com/matplotlib/$_pyname/archive/v$pkgver/matplotlib-v$pkgver.tar.gz
|
|
$pkgname-images-$pkgver.tar.gz::https://github.com/boomanaiden154/matplotlib-test-images/releases/download/matplotlib-$pkgver/matplotlib-images.tar.gz
|
|
freetype.patch
|
|
test.patch
|
|
"
|
|
builddir="$srcdir/$_pyname-$pkgver"
|
|
|
|
replaces="py-matplotlib" # Backwards compatibility
|
|
provides="py-matplotlib=$pkgver-r$pkgrel" # Backwards compatibility
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Use system freetype and qhull
|
|
sed -e 's|#system_freetype = False|system_freetype = True|' -e 's|#system_qhull = False|system_qhull = True|' mplsetup.cfg.template > mplsetup.cfg
|
|
# Install tests
|
|
sed -i 's|#tests = False|tests = True|' mplsetup.cfg
|
|
# Copy images from freetype mpl images repo
|
|
cp -r ../matplotlib-images/matplotlib-$CARCH/* lib/matplotlib/tests/baseline_images/
|
|
}
|
|
|
|
build() {
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
|
gpep517 build-wheel \
|
|
--wheel-dir dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
python3 -m venv --clear --without-pip --system-site-packages test-env
|
|
test-env/bin/python3 -m installer dist/*.whl
|
|
test-env/bin/python3 -m pytest -n $JOBS -v --pyargs matplotlib -m "not (nonfunctional or $CARCH)" \
|
|
--deselect=tests/test_backend_gtk3.py \
|
|
--deselect=tests/test_backend_gtk4.py
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer --destdir="$pkgdir" dist/*.whl
|
|
|
|
# Remove tests from installation
|
|
find "$pkgdir" -type d -name tests -exec rm -r {} \+
|
|
}
|
|
|
|
sha512sums="
|
|
8394269b5482bb4766b330946fe9600aca590e9a6b9634dd5c2a2c7fb6ff3a7364ef7705823938a146fc1ade60826b680fff8329378fefc2da61fa899c7c9ef5 matplotlib-v3.7.1.tar.gz
|
|
1f5624bd4d4b2b975920ff4c62c61deaef11afdf30490504b7b0480dfdca2afbcd49638446735e089b67aed959bcf7d3329462825e899a54780075a224810b8b py3-matplotlib-images-3.7.1.tar.gz
|
|
ea21b9ac0253253b657c542e31f3c8dc3161419d7c42aa92036b98338a27b59d1cc5d7f699c8cbaf0302f63a4f730301044a8d11cdee8f9fb8027a80a12a394b freetype.patch
|
|
25c904d308b48269c85e5e2c51fe24754e6113435d8319bb647ad16ac28878ed0c59f4dfb37ae7cb132b7d8161b724b6eb6590a60d04b7318e870078544ed5fa test.patch
|
|
"
|