summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2021-12-23 12:33:53 -0500
committerGitHub <noreply@github.com>2021-12-23 12:33:53 -0500
commit74d64fd61a0c83b326449da13dfd9453a5b7d894 (patch)
tree43f3f8806661f760eb92f68401c7b22758516352 /var
parent82bdda9a891b0114accfe426bda14191af0dc5dd (diff)
downloadspack-74d64fd61a0c83b326449da13dfd9453a5b7d894.tar.gz
spack-74d64fd61a0c83b326449da13dfd9453a5b7d894.tar.bz2
spack-74d64fd61a0c83b326449da13dfd9453a5b7d894.tar.xz
spack-74d64fd61a0c83b326449da13dfd9453a5b7d894.zip
py-pymol: update package, new version 2.5.0 (#28044)
* py-pymol: update package, new version 2.5.0 * ensure legacy plugins still load/work
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-pmw-patched/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-pymol/package.py58
2 files changed, 50 insertions, 22 deletions
diff --git a/var/spack/repos/builtin/packages/py-pmw-patched/package.py b/var/spack/repos/builtin/packages/py-pmw-patched/package.py
new file mode 100644
index 0000000000..f17bf63452
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pmw-patched/package.py
@@ -0,0 +1,14 @@
+# Copyright 2013-2021 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)
+
+
+class PyPmwPatched(PythonPackage):
+ """Schrodinger's Fork of Python megawidgets with essential patches applied.
+ Pmw is a toolkit for building high-level compound widgets, or
+ megawidgets, constructed using other widgets as component parts."""
+ homepage = "https://github.com/schrodinger/pmw-patched"
+ git = "https://github.com/schrodinger/pmw-patched"
+
+ version('02-10-2020', commit='8bedfc8747e7757c1048bc5e11899d1163717a43')
diff --git a/var/spack/repos/builtin/packages/py-pymol/package.py b/var/spack/repos/builtin/packages/py-pymol/package.py
index 557caf7692..f62e0c76ab 100644
--- a/var/spack/repos/builtin/packages/py-pymol/package.py
+++ b/var/spack/repos/builtin/packages/py-pymol/package.py
@@ -15,29 +15,43 @@ class PyPymol(PythonPackage):
homepage = "https://pymol.org"
url = "https://github.com/schrodinger/pymol-open-source/archive/v2.4.0.tar.gz"
+ version('2.5.0', sha256='aa828bf5719bd9a14510118a93182a6e0cadc03a574ba1e327e1e9780a0e80b3')
version('2.4.0', sha256='5ede4ce2e8f53713c5ee64f5905b2d29bf01e4391da7e536ce8909d6b9116581')
version('2.3.0', sha256='62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0')
- depends_on('python+tkinter', type=('build', 'run'))
- depends_on('freetype', type=('build', 'run'))
- depends_on('glew', type=('build'))
- depends_on('glm', type=('build'))
- depends_on('py-numpy', type=('build', 'run'))
- depends_on('tcsh', type=('build', 'run'))
+ depends_on('python+tkinter@2.7:', type=('build', 'run'), when='@2.3.0:2.4.0')
+ depends_on('python+tkinter@3.6:', type=('build', 'run'), when='@2.5.0:')
+ depends_on('gl')
+ depends_on('glew')
+ depends_on('libpng')
+ depends_on('freetype')
+ depends_on('glm')
+ depends_on('libmmtf-cpp')
+ depends_on('msgpack-c@2.1.5:')
+ depends_on('netcdf-cxx4')
+ depends_on('libxml2')
+ depends_on('py-pmw-patched', type=('build', 'run'))
depends_on('py-pyqt5', type=('build', 'run'))
- depends_on('py-pmw', type=('build', 'run'))
- depends_on('libmmtf-cpp', type=('build', 'run', 'link'))
- depends_on('msgpack-c', type=('build', 'run'))
- depends_on('libpng@1.5.13', type=('build', 'run'))
-
- def setup_build_environment(self, env):
- include = []
- library = []
- for dep in self.spec.dependencies(deptype='link'):
- query = self.spec[dep.name]
- include.extend(query.headers.directories)
-
- env.set('CPATH', ':'.join(include))
- env.set('LIBRARY_PATH', ':'.join(library))
- env.set('PREFIX_PATH', self.spec['libpng'].prefix)
- env.prepend_path('PREFIX_PATH', self.spec['py-pyqt5'].prefix)
+ depends_on('py-numpy', type=('build', 'run'))
+
+ def install_args(self, spec, prefix):
+ args = super(PyPymol, self).install_args(spec, prefix)
+ args.append('--no-launcher')
+ return args
+
+ @run_after('install')
+ def install_launcher(self):
+ binpath = self.prefix.bin
+ mkdirp(self.prefix.bin)
+ fname = join_path(binpath, 'pymol')
+ script = join_path(self.prefix,
+ self.spec['python'].package.site_packages_dir,
+ 'pymol',
+ '__init__.py')
+
+ shebang = '#!/bin/sh\n'
+ fdata = 'exec {0} {1} \"$@\"'.format(self.spec['python'].command,
+ script)
+ with open(fname, 'w') as new:
+ new.write(shebang + fdata)
+ set_executable(fname)