From e3bae8f9363a4942b31970f487dff266c05fffd2 Mon Sep 17 00:00:00 2001 From: Levi Baber Date: Mon, 3 Sep 2018 20:34:41 -0500 Subject: py-matplotlib: incorporate 8532 w/ version range (#9151) * py-matplotlib: Add patch to fix FreeType library detection Adds patch to add $CPATH to locations searched for FreeType header file Patch has been upstreamed: https://github.com/matplotlib/matplotlib/pull/11457 * py-matplotlib: Add patch to fix FreeType library detection * Make patch only apply to versin 2.2.2 (as already upstreamed) * Fix flake8 format issue * py-matplotlib: add range to freetype patch * py-matplotlib: whitespace --- .../packages/py-matplotlib/freetype-include-path.patch | 16 ++++++++++++++++ .../repos/builtin/packages/py-matplotlib/package.py | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch diff --git a/var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch b/var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch new file mode 100644 index 0000000000..7007c88d0d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch @@ -0,0 +1,16 @@ +diff --git a/setupext.py b/setupext.py +index 6d363012eb4..00ef3fe5a3d 100644 +--- a/setupext.py ++++ b/setupext.py +@@ -162,8 +162,10 @@ def get_include_dirs(): + """ + include_dirs = [os.path.join(d, 'include') for d in get_base_dirs()] + if sys.platform != 'win32': +- # gcc includes this dir automatically, so also look for headers in ++ # gcc includes these dirs automatically, so also look for headers in + # these dirs ++ include_dirs.extend( ++ os.environ.get('CPATH', '').split(os.pathsep)) + include_dirs.extend( + os.environ.get('CPLUS_INCLUDE_PATH', '').split(os.pathsep)) + return include_dirs diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index a1947b18dd..38db52146b 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -34,6 +34,7 @@ class PyMatplotlib(PythonPackage): homepage = "https://pypi.python.org/pypi/matplotlib" url = "https://pypi.io/packages/source/m/matplotlib/matplotlib-2.0.2.tar.gz" + version('2.2.3', '403b0bddd751d71187416f20d4cff100') version('2.2.2', 'dd1e49e041309a7fd4e32be8bf17c3b6') version('2.0.2', '061111784278bde89b5d4987014be4ca') version('2.0.0', '7aa54b06327f0e1c4f3877fc2f7d6b17') @@ -68,6 +69,7 @@ class PyMatplotlib(PythonPackage): depends_on('libpng@1.2:') depends_on('freetype@2.3:') + patch('freetype-include-path.patch', when='@2.2.2:2.9.9') # Patch to pick up correct freetype headers depends_on('py-numpy@1.6:', type=('build', 'run')) depends_on('py-dateutil@1.1:', type=('build', 'run')) -- cgit v1.2.3-70-g09d2