From 482152e09203fe28a0bc02a5fea70d24fe60c8ab Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 30 Jul 2019 17:13:32 -0500 Subject: Add py-wxpython package (#12163) --- var/spack/repos/builtin/packages/cistem/package.py | 2 +- .../repos/builtin/packages/ctffind/package.py | 2 +- var/spack/repos/builtin/packages/gdl/package.py | 2 +- .../repos/builtin/packages/gnuplot/package.py | 2 +- .../repos/builtin/packages/paraver/package.py | 2 +- var/spack/repos/builtin/packages/plplot/package.py | 2 +- .../repos/builtin/packages/py-wxpython/package.py | 38 ++++++++++++++++ .../repos/builtin/packages/saga-gis/package.py | 2 +- .../repos/builtin/packages/wx/math_include.patch | 12 ----- var/spack/repos/builtin/packages/wx/package.py | 52 ---------------------- .../repos/builtin/packages/wxpropgrid/package.py | 2 +- .../builtin/packages/wxwidgets/math_include.patch | 12 +++++ .../repos/builtin/packages/wxwidgets/package.py | 52 ++++++++++++++++++++++ 13 files changed, 110 insertions(+), 72 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-wxpython/package.py delete mode 100644 var/spack/repos/builtin/packages/wx/math_include.patch delete mode 100644 var/spack/repos/builtin/packages/wx/package.py create mode 100644 var/spack/repos/builtin/packages/wxwidgets/math_include.patch create mode 100644 var/spack/repos/builtin/packages/wxwidgets/package.py diff --git a/var/spack/repos/builtin/packages/cistem/package.py b/var/spack/repos/builtin/packages/cistem/package.py index 7e2629768b..68d552b51d 100644 --- a/var/spack/repos/builtin/packages/cistem/package.py +++ b/var/spack/repos/builtin/packages/cistem/package.py @@ -17,5 +17,5 @@ class Cistem(AutotoolsPackage): version('1.0.0-beta', '479f395b30ad630df3cbba9c56eb29c2') - depends_on('wx@3.0.2') + depends_on('wxwidgets@3.0.2') depends_on('fftw') diff --git a/var/spack/repos/builtin/packages/ctffind/package.py b/var/spack/repos/builtin/packages/ctffind/package.py index 22bd55221d..1e895ff91c 100644 --- a/var/spack/repos/builtin/packages/ctffind/package.py +++ b/var/spack/repos/builtin/packages/ctffind/package.py @@ -14,5 +14,5 @@ class Ctffind(AutotoolsPackage): version('4.1.8', '8ae9d9abe363141a3792981b5a2fae94') - depends_on('wx') + depends_on('wxwidgets') depends_on('fftw@3:') diff --git a/var/spack/repos/builtin/packages/gdl/package.py b/var/spack/repos/builtin/packages/gdl/package.py index 700720b7f9..2517cce6eb 100644 --- a/var/spack/repos/builtin/packages/gdl/package.py +++ b/var/spack/repos/builtin/packages/gdl/package.py @@ -48,7 +48,7 @@ class Gdl(CMakePackage): depends_on('proj@:5', when='+proj') depends_on('py-numpy', type=('build', 'run'), when='+embed_python') depends_on('python@2.7:2.8', type=('build', 'run'), when='+embed_python') - depends_on('wx', when='+wx') + depends_on('wxwidgets', when='+wx') depends_on('eigen') depends_on('fftw') diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py index 0095b0a5e6..c33b207cf2 100644 --- a/var/spack/repos/builtin/packages/gnuplot/package.py +++ b/var/spack/repos/builtin/packages/gnuplot/package.py @@ -59,7 +59,7 @@ class Gnuplot(AutotoolsPackage): depends_on('libcerf', when='+libcerf') depends_on('libgd', when='+gd') depends_on('cairo@1.2:', when='+cairo') - depends_on('wx', when='+wx') + depends_on('wxwidgets', when='+wx') depends_on('pango@1.10:', when='+wx') depends_on('pango@1.10:', when='+cairo') depends_on('libx11', when='+X') diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py index 347e77849c..7cc4c70d9a 100644 --- a/var/spack/repos/builtin/packages/paraver/package.py +++ b/var/spack/repos/builtin/packages/paraver/package.py @@ -22,7 +22,7 @@ class Paraver(Package): depends_on("boost") # depends_on("extrae") - depends_on("wx") + depends_on("wxwidgets") depends_on("wxpropgrid") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/plplot/package.py b/var/spack/repos/builtin/packages/plplot/package.py index 6f1bed984a..6c6a5a4d78 100644 --- a/var/spack/repos/builtin/packages/plplot/package.py +++ b/var/spack/repos/builtin/packages/plplot/package.py @@ -35,7 +35,7 @@ class Plplot(CMakePackage): depends_on('python@2.7:2.8', type=('build', 'run'), when='+python') depends_on('qt', when='+qt') depends_on('tcl', when='+tcl') - depends_on('wx', when='+wx') + depends_on('wxwidgets', when='+wx') depends_on('freetype') depends_on('gtkplus') diff --git a/var/spack/repos/builtin/packages/py-wxpython/package.py b/var/spack/repos/builtin/packages/py-wxpython/package.py new file mode 100644 index 0000000000..4acb9de6c5 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wxpython/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyWxpython(PythonPackage): + """Cross platform GUI toolkit for Python.""" + + homepage = "https://www.wxpython.org/" + url = "https://pypi.io/packages/source/w/wxPython/wxPython-4.0.6.tar.gz" + + import_modules = [ + 'wx', 'wx.tools', 'wx.py', 'wx.lib', 'wx.lib.analogclock', + 'wx.lib.floatcanvas', 'wx.lib.plot', 'wx.lib.mixins', 'wx.lib.gizmos', + 'wx.lib.art', 'wx.lib.pdfviewer', 'wx.lib.colourchooser', + 'wx.lib.masked', 'wx.lib.ogl', 'wx.lib.wxcairo', 'wx.lib.agw', + 'wx.lib.pubsub', 'wx.lib.editor', 'wx.lib.analogclock.lib_setup', + 'wx.lib.floatcanvas.Utilities', 'wx.lib.plot.examples', + 'wx.lib.agw.aui', 'wx.lib.agw.ribbon', 'wx.lib.agw.persist', + 'wx.lib.pubsub.core', 'wx.lib.pubsub.utils', 'wx.lib.pubsub.core.arg1', + 'wx.lib.pubsub.core.kwargs' + ] + + version('4.0.6', sha256='35cc8ae9dd5246e2c9861bb796026bbcb9fb083e4d49650f776622171ecdab37') + + depends_on('wxwidgets') + + # Needed for the build.py script + depends_on('py-setuptools', type='build') + depends_on('py-pathlib2', type='build') + + # Needed at runtime + depends_on('py-numpy', type='run') + depends_on('py-pillow', type='run') + depends_on('py-six', type='run') diff --git a/var/spack/repos/builtin/packages/saga-gis/package.py b/var/spack/repos/builtin/packages/saga-gis/package.py index 5cf2b980d9..04ba7f6b92 100644 --- a/var/spack/repos/builtin/packages/saga-gis/package.py +++ b/var/spack/repos/builtin/packages/saga-gis/package.py @@ -55,7 +55,7 @@ class SagaGis(AutotoolsPackage): # dependency through meson by a dependency of wx/gtkplus depends_on('python@3:') - depends_on('wx') + depends_on('wxwidgets') depends_on('gdal') depends_on('proj@:5') diff --git a/var/spack/repos/builtin/packages/wx/math_include.patch b/var/spack/repos/builtin/packages/wx/math_include.patch deleted file mode 100644 index 152f095d18..0000000000 --- a/var/spack/repos/builtin/packages/wx/math_include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx -index cd72953ae7..8c19154313 100644 ---- a/src/stc/scintilla/src/Editor.cxx -+++ b/src/stc/scintilla/src/Editor.cxx -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/var/spack/repos/builtin/packages/wx/package.py b/var/spack/repos/builtin/packages/wx/package.py deleted file mode 100644 index 879fc71e29..0000000000 --- a/var/spack/repos/builtin/packages/wx/package.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack import * -import sys - - -class Wx(AutotoolsPackage): - """wxWidgets is a C++ library that lets developers create - applications for Windows, Mac OS X, Linux and other platforms - with a single code base. It has popular language bindings for - Python, Perl, Ruby and many other languages, and unlike other - cross-platform toolkits, wxWidgets gives applications a truly - native look and feel because it uses the platform's native API - rather than emulating the GUI. It's also extensive, free, - open-source and mature.""" - - homepage = "http://www.wxwidgets.org/" - url = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2" - git = "https://github.com/wxWidgets/wxWidgets.git" - - version('develop', branch='master') - version('3.1.0', '2170839cfa9d9322e8ee8368b21a15a2497b4f11') - version('3.0.2', '6461eab4428c0a8b9e41781b8787510484dea800') - version('3.0.1', '73e58521d6871c9f4d1e7974c6e3a81629fddcf8') - - patch('math_include.patch', when='@3.0.1:3.0.2') - - depends_on('pkgconfig', type='build') - depends_on('gtkplus') - - @when('@:3.0.2') - def build(self, spec, prefix): - make(parallel=False) - - def configure_args(self): - spec = self.spec - options = [ - '--enable-unicode', - '--disable-precomp-headers' - ] - - # see http://trac.wxwidgets.org/ticket/17639 - if spec.satisfies('@:3.1.0') and sys.platform == 'darwin': - options.extend([ - '--disable-qtkit', - '--disable-mediactrl' - ]) - - return options diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py index d1c3b792f4..ed79bc50ba 100644 --- a/var/spack/repos/builtin/packages/wxpropgrid/package.py +++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py @@ -16,7 +16,7 @@ class Wxpropgrid(Package): version('1.4.15', 'f44b5cd6fd60718bacfabbf7994f1e93') - depends_on("wx") + depends_on("wxwidgets") def install(self, spec, prefix): configure("--prefix=%s" % prefix, "--with-wxdir=%s" % diff --git a/var/spack/repos/builtin/packages/wxwidgets/math_include.patch b/var/spack/repos/builtin/packages/wxwidgets/math_include.patch new file mode 100644 index 0000000000..152f095d18 --- /dev/null +++ b/var/spack/repos/builtin/packages/wxwidgets/math_include.patch @@ -0,0 +1,12 @@ +diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx +index cd72953ae7..8c19154313 100644 +--- a/src/stc/scintilla/src/Editor.cxx ++++ b/src/stc/scintilla/src/Editor.cxx +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/var/spack/repos/builtin/packages/wxwidgets/package.py b/var/spack/repos/builtin/packages/wxwidgets/package.py new file mode 100644 index 0000000000..39e235f1f3 --- /dev/null +++ b/var/spack/repos/builtin/packages/wxwidgets/package.py @@ -0,0 +1,52 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import sys + + +class Wxwidgets(AutotoolsPackage): + """wxWidgets is a C++ library that lets developers create + applications for Windows, Mac OS X, Linux and other platforms + with a single code base. It has popular language bindings for + Python, Perl, Ruby and many other languages, and unlike other + cross-platform toolkits, wxWidgets gives applications a truly + native look and feel because it uses the platform's native API + rather than emulating the GUI. It's also extensive, free, + open-source and mature.""" + + homepage = "http://www.wxwidgets.org/" + url = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2" + git = "https://github.com/wxWidgets/wxWidgets.git" + + version('develop', branch='master') + version('3.1.0', '2170839cfa9d9322e8ee8368b21a15a2497b4f11') + version('3.0.2', '6461eab4428c0a8b9e41781b8787510484dea800') + version('3.0.1', '73e58521d6871c9f4d1e7974c6e3a81629fddcf8') + + patch('math_include.patch', when='@3.0.1:3.0.2') + + depends_on('pkgconfig', type='build') + depends_on('gtkplus') + + @when('@:3.0.2') + def build(self, spec, prefix): + make(parallel=False) + + def configure_args(self): + spec = self.spec + options = [ + '--enable-unicode', + '--disable-precomp-headers' + ] + + # see http://trac.wxwidgets.org/ticket/17639 + if spec.satisfies('@:3.1.0') and sys.platform == 'darwin': + options.extend([ + '--disable-qtkit', + '--disable-mediactrl' + ]) + + return options -- cgit v1.2.3-70-g09d2