matplotlib: update to 3.9.0

This commit is contained in:
مهدي شينون (Mehdi Chinoune)
2024-06-22 06:00:22 +01:00
parent ec15eebeef
commit d6ec955aa7
2 changed files with 16 additions and 61 deletions

View File

@@ -7,7 +7,7 @@ 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.3
pkgver=3.9.0
pkgrel=1
pkgdesc="A python plotting library, making publication quality plots (mingw-w64)"
arch=('any')
@@ -18,7 +18,8 @@ msys2_references=(
'pypi: matplotlib'
)
license=('custom')
depends=("${MINGW_PACKAGE_PREFIX}-python-contourpy"
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-contourpy"
"${MINGW_PACKAGE_PREFIX}-python-cycler"
"${MINGW_PACKAGE_PREFIX}-python-fonttools"
"${MINGW_PACKAGE_PREFIX}-python-kiwisolver"
@@ -32,41 +33,36 @@ depends=("${MINGW_PACKAGE_PREFIX}-python-contourpy"
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}-python-wheel"
"${MINGW_PACKAGE_PREFIX}-meson-python"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-pybind11"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-pkgconf")
"${MINGW_PACKAGE_PREFIX}-cc")
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=('7b416239e9ae38be54b028abbf9048aff5054a9aba5416bef0bd17f9162ce161'
'fd0cb2d039bc85c97d8b3a1837faa3c560ef4a530f729517ea115917f0f8a972')
source=("https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('e6d29ea6c19e34b30fb7d88b7081f869a03014f66fe06d62cc77d5a6ea88ed7a')
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}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation \
-Csetup-args="-Dsystem-freetype=true" \
-Csetup-args="-Dsystem-qhull=true"
}
package() {

View File

@@ -1,41 +0,0 @@
--- a/setupext.py
+++ b/setupext.py
@@ -19,6 +19,7 @@
_log = logging.getLogger(__name__)
+MSYS = "MSYSTEM" in os.environ
def _get_xdg_cache_dir():
"""
@@ -198,10 +199,10 @@
'backend': config.get('rc_options', 'backend', fallback=None),
'system_freetype': config.getboolean(
'libs', 'system_freetype',
- fallback=sys.platform.startswith(('aix', 'os400'))
+ fallback=sys.platform.startswith(('aix', 'os400')) or MSYS
),
'system_qhull': config.getboolean(
- 'libs', 'system_qhull', fallback=sys.platform.startswith('os400')
+ 'libs', 'system_qhull', fallback=sys.platform.startswith('os400') or MSYS
),
}
@@ -225,7 +226,7 @@
"""
Get path to pkg-config and set up the PKG_CONFIG environment variable.
"""
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not MSYS:
return None
pkg_config = os.environ.get('PKG_CONFIG') or 'pkg-config'
if shutil.which(pkg_config) is None:
@@ -277,7 +278,7 @@
# conda Windows header and library paths.
# https://github.com/conda/conda/issues/2312 re: getting the env dir.
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not MSYS:
conda_env_path = (os.getenv('CONDA_PREFIX') # conda >= 4.1
or os.getenv('CONDA_DEFAULT_ENV')) # conda < 4.1
if conda_env_path and os.path.isdir(conda_env_path):