Skip to content

Commit

Permalink
Trac #28023: matplotlib 2.2.4 + patches
Browse files Browse the repository at this point in the history
Upgrade to matplotlib 2.2.4

'''Tarball''':
http://sage.ugent.be/www/jdemeyer/sage/matplotlib-2.2.4.tar.bz2

We add two patches:
- matplotlib/matplotlib#14587 to fix a build
regression since 2.2.3.
- matplotlib/matplotlib#14582 which is needed
for Python 3.8 support.

URL: https://trac.sagemath.org/28023
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Vincent Klein
  • Loading branch information
Release Manager committed Jul 30, 2019
2 parents 92ff95d + 296092e commit d825f97
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 57 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/matplotlib/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=matplotlib-VERSION.tar.bz2
sha1=51699b1691a4e72277137d27920f1bc497ddbe8c
md5=01d80a43aa613bbe08471550ec538a89
cksum=1426999787
sha1=1e650be3851dd5d57e1c48fe31dd91566ea45cdd
md5=111b2951ce5803ed4805dec4edefcecd
cksum=442239497
2 changes: 1 addition & 1 deletion build/pkgs/matplotlib/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3.p0
2.2.4.p0
42 changes: 0 additions & 42 deletions build/pkgs/matplotlib/patches/avoid_asscalar.patch

This file was deleted.

22 changes: 22 additions & 0 deletions build/pkgs/matplotlib/patches/install-jquery-ui.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
See https://github.com/matplotlib/matplotlib/pull/14587

commit 564edad96232e028294d7421b41955029e16816f
Author: Jeroen Demeyer <J.Demeyer@UGent.be>
Date: Thu Jun 20 13:45:09 2019 +0200

Install verdored copy of jquery-ui

diff --git a/setupext.py b/setupext.py
index c75725b..3536cf6 100644
--- a/setupext.py
+++ b/setupext.py
@@ -871,6 +871,9 @@ class Matplotlib(SetupPackage):
'backends/web_backend/jquery/js/*.min.js',
'backends/web_backend/jquery/css/themes/base/*.min.css',
'backends/web_backend/jquery/css/themes/base/images/*',
+ 'backends/web_backend/jquery-ui-*/*',
+ 'backends/web_backend/jquery-ui-*/*/*',
+ 'backends/web_backend/jquery-ui-*/*/*/*',
'backends/web_backend/css/*.*',
'backends/Matplotlib.nib/*',
'mpl-data/stylelib/*.mplstyle',
40 changes: 40 additions & 0 deletions build/pkgs/matplotlib/patches/python38.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
See https://github.com/matplotlib/matplotlib/pull/14582

commit 4b957fde34c869e40d010d2ec871d3d219e59ee2
Author: Antony Lee <anntzer.lee@gmail.com>
Date: Fri Jul 20 19:04:25 2018 +0200

Backport PR #11722: Remove unnecessary hacks from setup.py.

- There are no symlinks in the mpl source tree anymore.
- MANIFEST was removed from the root directory in 365a0a2f (11 years
ago).

diff --git a/setup.py b/setup.py
index 41037e9..b045f89 100644
--- a/setup.py
+++ b/setup.py
@@ -11,23 +11,6 @@ from setuptools.command.build_ext import build_ext as BuildExtCommand

import sys

-# distutils is breaking our sdists for files in symlinked dirs.
-# distutils will copy if os.link is not available, so this is a hack
-# to force copying
-import os
-try:
- del os.link
-except AttributeError:
- pass
-
-# This 'if' statement is needed to prevent spawning infinite processes
-# on Windows
-if __name__ == '__main__':
- # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
- # update it when the contents of directories change.
- if os.path.exists('MANIFEST'):
- os.remove('MANIFEST')
-
from io import BytesIO
import os
from string import Template
21 changes: 10 additions & 11 deletions build/pkgs/matplotlib/spkg-src
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

set -e

[ -n "${SAGE_ROOT}" ] || SAGE_ROOT="$(readlink -f $(dirname ${0})/../../../)"
if [ -z "${SAGE_ROOT}" ]; then
echo >&2 "This must be run within a Sage shell"
exit 1
fi


# Set the version and its download URL.
VERSION=2.2.2
DOWNLOAD_URL="https://github.com/matplotlib/matplotlib/archive/v${VERSION}.tar.gz"

# fetch and unpack latest version
tar xzf <( curl -L ${DOWNLOAD_URL} )
VERSION=2.2.4
pip download --no-deps --no-binary :all: "matplotlib==${VERSION}"
tar xzf "matplotlib-${VERSION}.tar.gz"


# remove test images
Expand All @@ -20,10 +20,9 @@ rm -rf matplotlib-${VERSION}/lib/matplotlib/tests/baseline_images/*

# repack and cleanup temporary directory
tar cjf "$SAGE_ROOT/upstream/matplotlib-${VERSION}.tar.bz2" matplotlib-${VERSION}
rm -rf matplotlib-${VERSION}
rm -rf matplotlib-${VERSION}*


# update package info
echo "${VERSION}" > "${SAGE_ROOT}/build/pkgs/matplotlib/package-version.txt"
"$SAGE_ROOT"/sage --package fix-checksum matplotlib

echo "${VERSION}.p0" >"${SAGE_ROOT}/build/pkgs/matplotlib/package-version.txt"
sage --package fix-checksum matplotlib

0 comments on commit d825f97

Please sign in to comment.