Bug 236455 - math/py-matplotlib: update to 2.2.4
Summary: math/py-matplotlib: update to 2.2.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Thomas Zander
Keywords: patch-ready
Depends on: 236456
Blocks: 232307 236457
  Show dependency treegraph
Reported: 2019-03-10 19:29 UTC by Loïc Bartoletti
Modified: 2019-04-01 13:13 UTC (History)
4 users (show)

See Also:
mainland: maintainer-feedback+

matplotlib 2.2.4 (12.17 KB, patch)
2019-03-10 19:29 UTC, Loïc Bartoletti
no flags Details | Diff
matplotlib-2.2.4 (2.50 KB, patch)
2019-03-22 05:43 UTC, Loïc Bartoletti
no flags Details | Diff
matplotlib-2.2.4 (3.73 KB, patch)
2019-03-22 05:44 UTC, Loïc Bartoletti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer 2019-03-10 19:29:24 UTC
Created attachment 202781 [details]
matplotlib 2.2.4

The forth bug-fix release of the v2.2 LTS series.

 - Fix a memory leak with PySide2.
 - rename :math: sphinx directive to :mathmpl: to work with sphinx >
   1.8. Both versions are now available if sphinx < 1.8.
 - avoids numpy deprecation warnings.
 - fixes to tests to work with pytest >= 3.8 and the minimum is now
   pytest >= 3.6.

jquery-ui is no longer bundled in git repo and is downloaded during
the install or sdist process. If you are installing from pypi the
files will be included, but if you are installing from git you will
need internet access the first time you run pip install .. The
install process tries to cache the files and will not need internet
access on future installations.


I updated matplotlib base on the works of sunpoet@ for 2.2.3 Also since jquery is not bundled I have to add a distfiles and add a workaround in setup.py. Note sure if it's the better workaround but it's works.
Comment 1 mainland 2019-03-21 14:30:15 UTC
I approve the patch.
Comment 2 Loïc Bartoletti freebsd_committer 2019-03-22 05:43:12 UTC
Created attachment 203040 [details]

Update my previous with some fix on RUN_DEPENDS and diff with latest ports: 2.2.3
Comment 3 Loïc Bartoletti freebsd_committer 2019-03-22 05:44:41 UTC
Created attachment 203041 [details]
Comment 4 Sunpoet Po-Chuan Hsieh freebsd_committer 2019-03-23 13:00:20 UTC
(In reply to lbartoletti from comment #0)

jquery-ui-1.12.1.zip is bundled in the tarball. All we need is a patched setup.py.

% fetch https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip
% tar -xf jquery-ui-1.12.1.zip
% fetch https://files.pythonhosted.org/packages/source/m/matplotlib/matplotlib-2.2.4.tar.gz
% tar -xf matplotlib-2.2.4.tar.gz
% diff -qr jquery-ui-1.12.1/ matplotlib-2.2.4/lib/matplotlib/backends/web_backend/jquery-ui-1.12.1/
Comment 5 commit-hook freebsd_committer 2019-03-23 18:49:39 UTC
A commit references this bug:

Author: riggs
Date: Sat Mar 23 18:48:59 UTC 2019
New revision: 496681
URL: https://svnweb.freebsd.org/changeset/ports/496681

  Update to upstream version 2.2.4

  While on it:
  - Pet portlint

  PR:		236455
  Submitted by:	lbartoletti@tuxfamily.org
  Approved by:	mainland@apeiron.net (maintainer)

Comment 6 Thomas Zander freebsd_committer 2019-03-23 18:58:56 UTC
Please double check build with poudriere before submitting the patch. There were plist and dependency issues which prevented proper packaging. This is easy to catch in a poudriere testport.
Comment 7 Sunpoet Po-Chuan Hsieh freebsd_committer 2019-03-23 19:39:11 UTC
As I mentioned in comment #4, it is not needed to add jquery-ui-1.12.1.zip to DISTFILES. All you need is:

+	${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/web_backend/jquery-ui-1.12.1
+	cd ${WRKSRC}/lib/matplotlib/backends/web_backend/jquery-ui-1.12.1 && ${COPYTREE_SHARE} . 

--- setup.py.orig       2019-02-26 00:18:32 UTC
+++ setup.py
@@ -189,7 +189,6 @@ class develop_with_jquery(DevelopCommand

 cmdclass['sdist'] = sdist_with_jquery
-cmdclass['install_lib'] = install_lib_with_jquery
 cmdclass['develop'] = develop_with_jquery

I'll submit a new PR for this.
Comment 8 Thomas Zander freebsd_committer 2019-03-24 20:35:02 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #7)

Sorry, I noticed your comment too late.
Yes, chasing this with a separate PR is the best solution, I agree. Thanks!