77 lines
3.3 KiB
Bash
77 lines
3.3 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.6.2
|
|
pkgrel=1
|
|
pkgdesc="A python plotting library, making publication quality plots (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
|
url='https://matplotlib.org/'
|
|
license=('custom')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python-pytz"
|
|
"${MINGW_PACKAGE_PREFIX}-python-numpy"
|
|
"${MINGW_PACKAGE_PREFIX}-python-cycler"
|
|
"${MINGW_PACKAGE_PREFIX}-python-dateutil"
|
|
"${MINGW_PACKAGE_PREFIX}-python-fonttools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-packaging"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pillow"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyparsing"
|
|
"${MINGW_PACKAGE_PREFIX}-python-kiwisolver"
|
|
"${MINGW_PACKAGE_PREFIX}-python-contourpy"
|
|
"${MINGW_PACKAGE_PREFIX}-freetype"
|
|
"${MINGW_PACKAGE_PREFIX}-qhull")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm-git-archive"
|
|
"${MINGW_PACKAGE_PREFIX}-python-certifi"
|
|
"${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-pkg-config")
|
|
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=("${_realname}-${pkgver}.tar.gz"::"https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz"
|
|
setupext.py.patch)
|
|
sha256sums=('b03fd10a1709d0101c054883b550f7c4c5e974f751e2680318759af005964990'
|
|
'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}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python setup.py build
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python setup.py install -O1 --skip-build \
|
|
--root="${pkgdir}" --prefix=${MINGW_PREFIX}
|
|
|
|
install -Dm644 LICENSE/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
|
}
|