Merge pull request #12702 from MehdiChinoune/python-matplotlib-update

python-matplotlib: update to 3.5.3
This commit is contained in:
Christoph Reiter
2022-08-20 11:51:21 +02:00
committed by GitHub
4 changed files with 38 additions and 35 deletions

View File

@@ -1,18 +0,0 @@
--- a/src/_tkagg.cpp
+++ b/src/_tkagg.cpp
@@ -259,6 +259,7 @@
HANDLE process = GetCurrentProcess(); // Pseudo-handle, doesn't need closing.
HMODULE* modules = NULL;
DWORD size;
+ bool tcl_ok = false, tk_ok = false;
if (!EnumProcessModules(process, NULL, 0, &size)) {
PyErr_SetFromWindowsErr(0);
goto exit;
@@ -271,7 +272,6 @@
PyErr_SetFromWindowsErr(0);
goto exit;
}
- bool tcl_ok = false, tk_ok = false;
for (unsigned i = 0; i < size / sizeof(HMODULE); ++i) {
if (!tcl_ok) {
tcl_ok = load_tcl(modules[i]);

View File

@@ -7,8 +7,8 @@ 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.5.2
pkgrel=2
pkgver=3.5.3
pkgrel=1
pkgdesc="A python plotting library, making publication quality plots (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
@@ -39,17 +39,17 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-python-pyqt5: Qt5Agg/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
0001-move-variable-initialization.patch)
sha256sums=('48cf850ce14fa18067f2d9e0d646763681948487a8080ec0af2686468b4607a2'
'a062e64775118de782b1995bd0b7b488de10cc5cbe8b5b834b79c0faea540826'
'9184347152a775114fa257aebe3549a3bd34eb52e36ed947a7eb4232bf0a6bad')
build-with-setuptools-scm-7.patch)
sha256sums=('339cac48b80ddbc8bfd05daae0a3a73414651a8596904c2a881cfd1edb65f26c'
'fd0cb2d039bc85c97d8b3a1837faa3c560ef4a530f729517ea115917f0f8a972'
'1e1690aa9cfe321fa5d3351602f028dc10cbfd2e9fbd74f08f5f90fdb4e2da8c')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i ${srcdir}/setupext.py.patch
# https://github.com/matplotlib/matplotlib/pull/23051
patch -p1 -i ${srcdir}/0001-move-variable-initialization.patch
# Revert https://github.com/matplotlib/matplotlib/pull/23479
patch -p1 -i ${srcdir}/build-with-setuptools-scm-7.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

View File

@@ -0,0 +1,20 @@
--- a/setup.py
+++ b/setup.py
@@ -316,7 +316,7 @@ def make_release_tree(self, base_dir, files):
setup_requires=[
"certifi>=2020.06.20",
"numpy>=1.17",
- "setuptools_scm>=4,<7",
+ "setuptools_scm>=4",
"setuptools_scm_git_archive",
],
install_requires=[
@@ -330,7 +330,7 @@ def make_release_tree(self, base_dir, files):
"python-dateutil>=2.7",
] + (
# Installing from a git checkout that is not producing a wheel.
- ["setuptools_scm>=4,<7"] if (
+ ["setuptools_scm>=4"] if (
Path(__file__).with_name(".git").exists() and
os.environ.get("CIBUILDWHEEL", "0") != "1"
) else []

View File

@@ -8,19 +8,20 @@
def _get_xdg_cache_dir():
"""
@@ -188,9 +189,9 @@
options = {
@@ -198,10 +199,10 @@
'backend': config.get('rc_options', 'backend', fallback=None),
'system_freetype': config.getboolean(
- 'libs', 'system_freetype', fallback=sys.platform.startswith('aix')),
+ 'libs', 'system_freetype', fallback=sys.platform.startswith('aix') or MSYS),
'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=False),
+ 'libs', 'system_qhull', fallback=False or MSYS),
- 'libs', 'system_qhull', fallback=sys.platform.startswith('os400')
+ 'libs', 'system_qhull', fallback=sys.platform.startswith('os400') or MSYS
),
}
@@ -213,7 +214,7 @@
@@ -225,7 +226,7 @@
"""
Get path to pkg-config and set up the PKG_CONFIG environment variable.
"""
@@ -29,7 +30,7 @@
return None
pkg_config = os.environ.get('PKG_CONFIG') or 'pkg-config'
if shutil.which(pkg_config) is None:
@@ -265,7 +266,7 @@
@@ -277,7 +278,7 @@
# conda Windows header and library paths.
# https://github.com/conda/conda/issues/2312 re: getting the env dir.