Date: Wednesday, April 5, 2023 @ 20:09:04
  Author: felixonmars
Revision: 1437982

archrelease: copy trunk to community-staging-x86_64

Added:
  python-matplotlib/repos/community-staging-x86_64/
  python-matplotlib/repos/community-staging-x86_64/PKGBUILD
    (from rev 1437981, python-matplotlib/trunk/PKGBUILD)
  python-matplotlib/repos/community-staging-x86_64/freetype.patch
    (from rev 1437981, python-matplotlib/trunk/freetype.patch)
  python-matplotlib/repos/community-staging-x86_64/keys/

----------------+
 PKGBUILD       |   97 +++++++++++++++++++++++++++++++
 freetype.patch |  170 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 267 insertions(+)

Copied: python-matplotlib/repos/community-staging-x86_64/PKGBUILD (from rev 
1437981, python-matplotlib/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-04-05 20:09:04 UTC (rev 1437982)
@@ -0,0 +1,97 @@
+# Maintainer: Felix Yan <[email protected]>
+# Maintainer: Bruno Pagani <[email protected]>
+# Contributor: Stéphane Gaudreault <[email protected]>
+# Contributor: Stefan Husmann <[email protected]>
+# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+# Contributor: Douglas Soares de Andrade <[email protected]>
+
+pkgname=python-matplotlib
+pkgver=3.7.1
+pkgrel=2
+pkgdesc="A python plotting library, making publication quality plots"
+arch=(x86_64)
+url="https://matplotlib.org";
+license=(custom)
+depends=(freetype2 python-contourpy python-cycler python-dateutil 
python-fonttools python-kiwisolver python-numpy
+         python-packaging python-pillow python-pyparsing qhull)
+optdepends=('tk: Tk{Agg,Cairo} backends'
+            'pyside2: alternative for Qt5{Agg,Cairo} backends'
+            'pyside6: alternative for Qt6{Agg,Cairo} backends'
+            'python-pyqt5: Qt5{Agg,Cairo} backends'
+            'python-pyqt6: Qt6{Agg,Cairo} backends'
+            'python-gobject: for GTK{3,4}{Agg,Cairo} backend'
+            'python-wxpython: WX{Agg,Cairo} backend'
+            'python-cairo: {GTK{3,4},Qt{5,6},Tk,WX}Cairo backends'
+            'python-cairocffi: alternative for Cairo backends'
+            'python-tornado: WebAgg backend'
+            'ffmpeg: for saving movies'
+            'imagemagick: for saving animated gifs'
+            'ghostscript: usetex dependencies'
+            'texlive-bin: usetex dependencies'
+            'texlive-latexextra: usetex usage with pdflatex'
+            'python-certifi: https support')
+makedepends=(git python-build python-installer python-certifi 
python-setuptools-scm pybind11 python-wheel)
+checkdepends=(python-pytest python-pytest-xdist python-pytest-runner 
python-pytest-rerunfailures xorg-server-xvfb
+              texlive-bin texlive-core texlive-latexextra texlive-pictures
+              ghostscript inkscape ffmpeg imagemagick gtk4
+              python-cairo python-cairocffi python-gobject python-pyqt5 pyside2
+              python-pyqt6 pyside6 python-tornado python-wxpython tk
+              jupyter-nbconvert jupyter-nbformat python-ipykernel
+              python-pandas python-pikepdf python-pytz python-xarray
+              noto-fonts-cjk wqy-zenhei)
+_tag=8dcbd965f3008b6dc324f4a45b65ff580e55090e # git rev-parse v${pkgver}
+_ftver=2.12.1
+source=(git+https://github.com/matplotlib/matplotlib.git#tag=${_tag}?signed
+        
https://github.com/QuLogic/mpl-images/archive/v${pkgver}-with-freetype-${_ftver}/mpl-images-${pkgver}-ft${_ftver}.tar.gz
+        freetype.patch)
+b2sums=('SKIP'
+        
'bcbf789be86c399e7bf08b8647622c4b97e905da7e58a41f5fce9cfdf3941aadf3cf5cb9bb8a417c5640c7e2d5409abffa63fe5a6e68a4b543caf0855acf25e9'
+        
'b821f938cace434932a43b15b42b93d0f8eaffea4e28fbf1d5a7263ec947c26252bafccaea60c1a1cb2fad4c71280ca2cf62527994f270af2467a242287470bb')
+validpgpkeys=(23CAB59E3332F94D26BEF0378D86E7FAE5EB0C10) # Elliott Sales de 
Andrade <[email protected]>
+
+prepare() {
+  cd matplotlib
+  # Fix SCM detected version
+  rm -r .git
+  # Don't require oldest-supported-numpy
+  sed -e 's|oldest-supported-numpy|numpy|' -i pyproject.toml
+  # 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
+  patch -p1 < ../freetype.patch # From Fedora/upstream
+  sed -e 's|2_000_000|2_500_000|' -i 
lib/matplotlib/tests/test_backends_interactive.py
+  # Install tests for check()
+  sed -i 's|#tests = False|tests = True|' mplsetup.cfg
+  # Use appropriate baseline images for tests
+  for _module in matplotlib mpl_toolkits
+  do
+    cp -r ../mpl-images-${pkgver}-with-freetype-${_ftver}/lib/${_module}/* 
lib/${_module}
+  done
+}
+
+build() {
+  cd matplotlib
+  export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd matplotlib
+  export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
+  python -m venv --system-site-packages test-env
+  test-env/bin/python -m installer dist/*.whl
+  # test_ipynb: https://github.com/matplotlib/matplotlib/issues/21654 fixed 
but `ModuleNotFoundError: No module named 'matplotlib'`
+  # test_compressed1: https://github.com/QuLogic/mpl-images/issues/4
+  XDG_RUNTIME_DIR=/tmp/runtime-build \
+  xvfb-run -a -s "-screen 0 640x480x24" \
+    test-env/bin/python -m pytest -ra -n auto -v --color=yes --pyargs 
matplotlib mpl_toolkits.{axes_grid1,axisartist,mplot3d} \
+      -k 'not test_ipynb and not test_compressed1 and not 
test_multi_font_type3 and not test_multi_font_type42 and not 
test_figure_legend_outside'
+}
+
+package() {
+  cd matplotlib
+  export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
+  python -m installer --destdir="${pkgdir}" dist/*.whl
+  install -Dm644 doc/users/project/license.rst -t 
"${pkgdir}"/usr/share/licenses/${pkgname}/
+  # Remove tests
+  rm -r "${pkgdir}"$(python -c "import site; 
print(site.getsitepackages()[0])")/{matplotlib,mpl_toolkits/*}/tests/
+}

Copied: python-matplotlib/repos/community-staging-x86_64/freetype.patch (from 
rev 1437981, python-matplotlib/trunk/freetype.patch)
===================================================================
--- community-staging-x86_64/freetype.patch                             (rev 0)
+++ community-staging-x86_64/freetype.patch     2023-04-05 20:09:04 UTC (rev 
1437982)
@@ -0,0 +1,170 @@
+From 00c02f0c02e9927d5bf9cab6f7d276d03afad558 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <[email protected]>
+Date: Fri, 14 Feb 2020 06:05:42 -0500
+Subject: [PATCH 2/4] Set FreeType version to 2.12.1 and update tolerances.
+
+Signed-off-by: Elliott Sales de Andrade <[email protected]>
+---
+ lib/matplotlib/__init__.py                     |  2 +-
+ lib/matplotlib/tests/test_axes.py              |  4 ++--
+ lib/matplotlib/tests/test_constrainedlayout.py |  6 +++---
+ lib/matplotlib/tests/test_polar.py             |  2 +-
+ lib/matplotlib/tests/test_tightlayout.py       | 10 +++++-----
+ setupext.py                                    | 15 +++++++++++++--
+ 6 files changed, 25 insertions(+), 14 deletions(-)
+
+diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
+index 5eae4b50e2..1e68e9b991 100644
+--- a/lib/matplotlib/__init__.py
++++ b/lib/matplotlib/__init__.py
+@@ -1212,7 +1212,7 @@ default_test_modules = [
+ def _init_tests():
+     # The version of FreeType to install locally for running the
+     # tests.  This must match the value in `setupext.py`
+-    LOCAL_FREETYPE_VERSION = '2.6.1'
++    LOCAL_FREETYPE_VERSION = '2.12.1'
+ 
+     from matplotlib import ft2font
+     if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
+diff --git a/lib/matplotlib/tests/test_axes.py 
b/lib/matplotlib/tests/test_axes.py
+index a230af2ac1..9cadbd7975 100644
+--- a/lib/matplotlib/tests/test_axes.py
++++ b/lib/matplotlib/tests/test_axes.py
+@@ -7203,7 +7203,7 @@ def test_normal_axes():
+     ]
+     for nn, b in enumerate(bbaxis):
+         targetbb = mtransforms.Bbox.from_bounds(*target[nn])
+-        assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
++        assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
+ 
+     target = [
+         [150.0, 119.999, 930.0, 11.111],
+@@ -7221,7 +7221,7 @@ def test_normal_axes():
+ 
+     target = [85.5138, 75.88888, 1021.11, 1017.11]
+     targetbb = mtransforms.Bbox.from_bounds(*target)
+-    assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
++    assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
+ 
+     # test that get_position roundtrips to get_window_extent
+     axbb = ax.get_position().transformed(fig.transFigure).bounds
+diff --git a/lib/matplotlib/tests/test_backend_svg.py 
b/lib/matplotlib/tests/test_backend_svg.py
+index 680efd6737..1c1900a443 100644
+--- a/lib/matplotlib/tests/test_backend_svg.py
++++ b/lib/matplotlib/tests/test_backend_svg.py
+@@ -74,7 +74,7 @@ def test_bold_font_output():
+     ax.set_title('bold-title', fontweight='bold')
+ 
+ 
+-@image_comparison(['bold_font_output_with_none_fonttype.svg'])
++@image_comparison(['bold_font_output_with_none_fonttype.svg'], tol=15)
+ def test_bold_font_output_with_none_fonttype():
+     plt.rcParams['svg.fonttype'] = 'none'
+     fig, ax = plt.subplots()
+diff --git a/lib/matplotlib/tests/test_constrainedlayout.py 
b/lib/matplotlib/tests/test_constrainedlayout.py
+index 35eb850fcd..31086ae5b7 100644
+--- a/lib/matplotlib/tests/test_constrainedlayout.py
++++ b/lib/matplotlib/tests/test_constrainedlayout.py
+@@ -431,7 +431,7 @@ def test_hidden_axes():
+     extents1 = np.copy(axs[0, 0].get_position().extents)
+ 
+     np.testing.assert_allclose(
+-        extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-5)
++        extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-2)
+ 
+ 
+ def test_colorbar_align():
+@@ -637,7 +637,7 @@ def test_compressed1():
+     fig.draw_without_rendering()
+ 
+     pos = axs[0, 0].get_position()
+-    np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-3)
++    np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-2)
+     pos = axs[0, 1].get_position()
+     np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3)
+ 
+@@ -652,7 +652,7 @@ def test_compressed1():
+ 
+     pos = axs[0, 0].get_position()
+     np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3)
+-    np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-3)
++    np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-2)
+     pos = axs[1, 2].get_position()
+     np.testing.assert_allclose(pos.x1, 0.8618, atol=1e-3)
+     np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-3)
+diff --git a/lib/matplotlib/tests/test_polar.py 
b/lib/matplotlib/tests/test_polar.py
+index c51508ae22..942ffcb521 100644
+--- a/lib/matplotlib/tests/test_polar.py
++++ b/lib/matplotlib/tests/test_polar.py
+@@ -314,7 +314,7 @@ def test_get_tightbbox_polar():
+     fig.canvas.draw()
+     bb = ax.get_tightbbox(fig.canvas.get_renderer())
+     assert_allclose(
+-        bb.extents, [107.7778,  29.2778, 539.7847, 450.7222], rtol=1e-03)
++        bb.extents, [107.7778,  29.2778, 539.7847, 450.7222], rtol=1)
+ 
+ 
+ @check_figures_equal(extensions=["png"])
+diff --git a/lib/matplotlib/tests/test_tightlayout.py 
b/lib/matplotlib/tests/test_tightlayout.py
+index 1eb7b4b453..697eba3211 100644
+--- a/lib/matplotlib/tests/test_tightlayout.py
++++ b/lib/matplotlib/tests/test_tightlayout.py
+@@ -173,12 +173,12 @@ def test_outward_ticks():
+     plt.tight_layout()
+     # These values were obtained after visual checking that they correspond
+     # to a tight layouting that did take the ticks into account.
+-    ans = [[[0.091, 0.607], [0.433, 0.933]],
+-           [[0.579, 0.607], [0.922, 0.933]],
+-           [[0.091, 0.140], [0.433, 0.466]],
+-           [[0.579, 0.140], [0.922, 0.466]]]
++    ans = [[[0.09, 0.61], [0.43, 0.93]],
++           [[0.58, 0.61], [0.92, 0.93]],
++           [[0.09, 0.14], [0.43, 0.47]],
++           [[0.58, 0.14], [0.92, 0.47]]]
+     for nn, ax in enumerate(fig.axes):
+-        assert_array_equal(np.round(ax.get_position().get_points(), 3),
++        assert_array_equal(np.round(ax.get_position().get_points(), 2),
+                            ans[nn])
+ 
+ 
+diff --git a/setupext.py b/setupext.py
+index 69835c12f7..79ee6174e1 100644
+--- a/setupext.py
++++ b/setupext.py
+@@ -168,13 +168,23 @@ _freetype_hashes = {
+         '955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
+     '2.10.1':
+         '3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
++    '2.10.2':
++        'e09aa914e4f7a5d723ac381420949c55c0b90b15744adce5d1406046022186ab',
++    '2.10.4':
++        '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac',
++    '2.11.0':
++        'a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f',
+     '2.11.1':
+-        'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b'
++        'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b',
++    '2.12.0':
++        '7940a46eeb0255baaa87c553d72778c4f8daa2b8888c8e2a05766a2a8686740c',
++    '2.12.1':
++        'efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938',
+ }
+ # This is the version of FreeType to use when building a local version.  It
+ # must match the value in lib/matplotlib.__init__.py, and the cache path in
+ # `.circleci/config.yml`.
+-TESTING_VERSION_OF_FREETYPE = '2.6.1'
++TESTING_VERSION_OF_FREETYPE = '2.12.1'
+ if sys.platform.startswith('win') and platform.machine() == 'ARM64':
+     # older versions of freetype are not supported for win/arm64
+     # Matplotlib tests will not pass
+@@ -584,6 +594,7 @@ class FreeType(SetupPackage):
+             ext.extra_objects.insert(
+                 0, str(src_path / 'objs' / '.libs' / libfreetype))
+             ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local'))
++            ext.libraries.append('brotlidec')
+ 
+     def do_custom_build(self, env):
+         # We're using a system freetype
+-- 
+2.36.1
+

Reply via email to