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
This commit is contained in:
parent
82bdda9a89
commit
74d64fd61a
14
var/spack/repos/builtin/packages/py-pmw-patched/package.py
Normal file
14
var/spack/repos/builtin/packages/py-pmw-patched/package.py
Normal file
@ -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')
|
@ -15,29 +15,43 @@ class PyPymol(PythonPackage):
|
|||||||
homepage = "https://pymol.org"
|
homepage = "https://pymol.org"
|
||||||
url = "https://github.com/schrodinger/pymol-open-source/archive/v2.4.0.tar.gz"
|
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.4.0', sha256='5ede4ce2e8f53713c5ee64f5905b2d29bf01e4391da7e536ce8909d6b9116581')
|
||||||
version('2.3.0', sha256='62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0')
|
version('2.3.0', sha256='62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0')
|
||||||
|
|
||||||
depends_on('python+tkinter', type=('build', 'run'))
|
depends_on('python+tkinter@2.7:', type=('build', 'run'), when='@2.3.0:2.4.0')
|
||||||
depends_on('freetype', type=('build', 'run'))
|
depends_on('python+tkinter@3.6:', type=('build', 'run'), when='@2.5.0:')
|
||||||
depends_on('glew', type=('build'))
|
depends_on('gl')
|
||||||
depends_on('glm', type=('build'))
|
depends_on('glew')
|
||||||
depends_on('py-numpy', type=('build', 'run'))
|
depends_on('libpng')
|
||||||
depends_on('tcsh', type=('build', 'run'))
|
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-pyqt5', type=('build', 'run'))
|
||||||
depends_on('py-pmw', type=('build', 'run'))
|
depends_on('py-numpy', 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):
|
def install_args(self, spec, prefix):
|
||||||
include = []
|
args = super(PyPymol, self).install_args(spec, prefix)
|
||||||
library = []
|
args.append('--no-launcher')
|
||||||
for dep in self.spec.dependencies(deptype='link'):
|
return args
|
||||||
query = self.spec[dep.name]
|
|
||||||
include.extend(query.headers.directories)
|
|
||||||
|
|
||||||
env.set('CPATH', ':'.join(include))
|
@run_after('install')
|
||||||
env.set('LIBRARY_PATH', ':'.join(library))
|
def install_launcher(self):
|
||||||
env.set('PREFIX_PATH', self.spec['libpng'].prefix)
|
binpath = self.prefix.bin
|
||||||
env.prepend_path('PREFIX_PATH', self.spec['py-pyqt5'].prefix)
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user