From aa58c653740db6052354b629b6a04e0c7bf9c8a1 Mon Sep 17 00:00:00 2001 From: Joe Garcia <joe.garcia@ssec.wisc.edu> Date: Mon, 17 May 2021 10:26:38 -0500 Subject: [PATCH] add qhull requirement for matplotlib --- ShellB3/shallbethree.sh | 31 +++++++++++++++++++ ShellB3/src/optional/qhull-2020-src-8.0.2.tgz | 3 ++ 2 files changed, 34 insertions(+) create mode 100644 ShellB3/src/optional/qhull-2020-src-8.0.2.tgz diff --git a/ShellB3/shallbethree.sh b/ShellB3/shallbethree.sh index be864eb4..5c64ac96 100755 --- a/ShellB3/shallbethree.sh +++ b/ShellB3/shallbethree.sh @@ -1080,6 +1080,7 @@ export PIXMANVER=0.40.0 export CAIROVER=1.16.0 export PYCAIROVER=1.20.0 export MOCKVER=4.0.3 +export QHULLVER=2020-src-8.0.2 QHULLTAG=2020.2 export MATPLOTLIBVER=3.4.2 export MPLD3VER=0.5.2 export MPLH5CANVASVER=0.7 @@ -6206,6 +6207,19 @@ mk_cycler(){ pip_install src/optional/cycler-*.tar.gz || oops "cycler did not install" } +mk_qhull() { + resume_tracker && return 0 + + _cmake_ninja_install qhull src/optional/qhull-${QHULLVER}.tgz qhull-${QHULLTAG} || oops "qhull wouldn't build" + + if isDarwin ; then + macho_repath --libraries="libqhull*.dylib" --extra-dylibs=lib + fi + purge_static_duplicates + + return 0 +} + mk_matplotlib_batch() { # batch matplotlib - no GUI resume_tracker && return 0 @@ -8211,6 +8225,9 @@ SOSAYWEALL _mk_matplotlib(){ resume_tracker && return 0 + _find_cots QHULL include/libqhull/libqhull.h $BASE ${SYSROOT}/usr || oops 'matplotlib needs qhull' + _find_cots_lib QHULL libqhull_r ${BASE} ${SYSROOT}/ || oops "Can't find libqhull" + export QHULL_INCLUDEPATH=${QHULL}/include make_script matplotlib append <<SOSAYWEALL cat >setup.cfg <<EOF @@ -8237,6 +8254,7 @@ backend = \${DEFAULTSTATE} [libs] system_freetype = True +system_qhull = True EOF if isLinux && isTrue USING_CLANG ; then @@ -8247,6 +8265,17 @@ fi SOSAYWEALL make_patch matplotlib <<PATCH +--- setupext.py 2021-05-07 23:43:09.000000000 -0500 ++++ setupext.py 2021-05-17 10:32:06.000000000 -0500 +@@ -666,6 +666,8 @@ + def add_flags(cls, ext): + if options.get("system_qhull"): + ext.libraries.append("qhull_r") ++ if 'QHULL_INCLUDEPATH' in os.environ: ++ ext.include_dirs.insert(0, str(os.environ['QHULL_INCLUDEPATH'])) + else: + cls._extensions_to_update.append(ext) + --- src/_macosx.m 2021-02-15 09:03:41.000000000 -0600 +++ src/_macosx.m 2021-02-15 09:04:45.000000000 -0600 @@ -701,8 +701,8 @@ @@ -11809,6 +11838,7 @@ mk_graphics() { && mk_libav \ && mk_olefile \ && mk_pillow \ + && mk_qhull \ && mk_matplotlib_batch \ && mk_pyshp \ && mk_shapely \ @@ -11918,6 +11948,7 @@ mk_gui() { && mk_libav \ && mk_olefile \ && mk_pillow \ + && mk_qhull \ && mk_matplotlib \ && mk_pyshp \ && mk_shapely \ diff --git a/ShellB3/src/optional/qhull-2020-src-8.0.2.tgz b/ShellB3/src/optional/qhull-2020-src-8.0.2.tgz new file mode 100644 index 00000000..f95eadf7 --- /dev/null +++ b/ShellB3/src/optional/qhull-2020-src-8.0.2.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e +size 1298874 -- GitLab