Files
MINGW-packages/mingw-w64-python-matplotlib/PKGBUILD
Christoph Reiter 2e61746cb6 Replace pkg-config with pkgconf everywhere
While the later replaces the former, pkg-config will still be installed
via makepkg if pkgconf isn't installed already.
2023-09-28 20:36:07 +02:00

80 lines
3.2 KiB
Bash

# Contributor: Christoph Reiter <reiter.chrsitoph@gmail.com>
# Contributor: @naveen521kk on Github Naveen M K<naveen521kk@gmail.com>
_realname=matplotlib
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=3.8.0
pkgrel=1
pkgdesc="A python plotting library, making publication quality plots (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
msys2_references=(
'pypi: matplotlib'
)
url='https://matplotlib.org/'
license=('custom')
depends=("${MINGW_PACKAGE_PREFIX}-python-contourpy"
"${MINGW_PACKAGE_PREFIX}-python-cycler"
"${MINGW_PACKAGE_PREFIX}-python-fonttools"
"${MINGW_PACKAGE_PREFIX}-python-kiwisolver"
"${MINGW_PACKAGE_PREFIX}-python-numpy"
"${MINGW_PACKAGE_PREFIX}-python-packaging"
"${MINGW_PACKAGE_PREFIX}-python-pillow"
"${MINGW_PACKAGE_PREFIX}-python-pyparsing"
"${MINGW_PACKAGE_PREFIX}-python-dateutil"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-qhull")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wheel"
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
"${MINGW_PACKAGE_PREFIX}-python-certifi"
"${MINGW_PACKAGE_PREFIX}-pybind11"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-pkgconf")
optdepends=("${MINGW_PACKAGE_PREFIX}-python-pyqt5: Qt5Agg/Qt5Cairo backend"
"${MINGW_PACKAGE_PREFIX}-gtk3: GTK3Agg/GTK3Cairo backend"
"${MINGW_PACKAGE_PREFIX}-python-gobject: GTK3Agg/GTK3Cairo backend"
"${MINGW_PACKAGE_PREFIX}-python-cairo: cairo/GTK3Cairo/Qt5Cairo backend"
"${MINGW_PACKAGE_PREFIX}-python-tornado: WebAgg backend")
source=("https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz"
setupext.py.patch)
sha256sums=('df8505e1c19d5c2c26aff3497a7cbd3ccfc2e97043d1e4db3e76afa399164b69'
'fd0cb2d039bc85c97d8b3a1837faa3c560ef4a530f729517ea115917f0f8a972')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i ${srcdir}/setupext.py.patch
# 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
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
cd ${srcdir}
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
}
build() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}