PySCF new package (#17474)
* Initial version of PySCF. * Add master branch to xcfun library * PySCF only compatible with specific commit of xcfun library * Update var/spack/repos/builtin/packages/py-pyscf/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-pyscf/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Revert "PySCF only compatible with specific commit of xcfun library" This reverts commit8296005400
. * Revert "Add master branch to xcfun library" This reverts commitf2b6998931
. * Issues conflict for xcfun library version rather than relying on a random commit. * Add version xcfun 2.0.0a2 which is needed by PySCF. * Remove xcfun conflict and express dependency more explictly. Add comment as to why this is necessary. Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
3f24188d19
commit
b320be70cb
43
var/spack/repos/builtin/packages/py-pyscf/package.py
Normal file
43
var/spack/repos/builtin/packages/py-pyscf/package.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Copyright 2013-2020 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 PyPyscf(PythonPackage):
|
||||||
|
"""PySCF is a collection of electronic structure programs powered
|
||||||
|
by Python."""
|
||||||
|
|
||||||
|
homepage = "https://sunqm.github.io/pyscf/"
|
||||||
|
git = "https://github.com/pyscf/pyscf"
|
||||||
|
|
||||||
|
maintainers = ['naromero77']
|
||||||
|
|
||||||
|
version('1.7.3', tag='v1.7.3')
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
depends_on('cmake@2.8:', type='build')
|
||||||
|
depends_on('python@2.6:', type=('build', 'run'))
|
||||||
|
depends_on('py-numpy@1.8.0:', type=('build', 'run'))
|
||||||
|
depends_on('py-scipy@0.12:', type=('build', 'run'))
|
||||||
|
depends_on('py-h5py@2.3.0:', type=('build', 'run'))
|
||||||
|
depends_on('blas')
|
||||||
|
depends_on('libcint+coulomb_erf+f12')
|
||||||
|
depends_on('libxc')
|
||||||
|
depends_on('xcfun@:2.0.0a2') # PySCF does not support recent version of the xcfun API'
|
||||||
|
|
||||||
|
def setup_build_environment(self, env):
|
||||||
|
# Tell PSCF where supporting libraries are located."
|
||||||
|
spec = self.spec
|
||||||
|
|
||||||
|
pyscf_search_dir = []
|
||||||
|
pyscf_search_dir.append(spec['blas'].prefix)
|
||||||
|
pyscf_search_dir.append(spec['libcint'].prefix)
|
||||||
|
pyscf_search_dir.append(spec['libxc'].prefix)
|
||||||
|
pyscf_search_dir.append(spec['xcfun'].prefix)
|
||||||
|
pyscf_search_dir.append(spec['xcfun'].prefix.include.XCFun)
|
||||||
|
|
||||||
|
env.set('PYSCF_INC_DIR', ":".join(pyscf_search_dir))
|
@ -16,6 +16,8 @@ class Xcfun(CMakePackage):
|
|||||||
|
|
||||||
version('2.0.0a6',
|
version('2.0.0a6',
|
||||||
sha256='a51086490890393439f98c5e3e4e1622908fe934bbc5063b1d4363cc4c15496d')
|
sha256='a51086490890393439f98c5e3e4e1622908fe934bbc5063b1d4363cc4c15496d')
|
||||||
|
version('2.0.0a2',
|
||||||
|
sha256='f29e80fdb5c8089fb0eeb7827659111005cb13eb42bf75fcb0c034f6bd067c31')
|
||||||
|
|
||||||
extends('python')
|
extends('python')
|
||||||
depends_on('cmake@3.11:', type='build')
|
depends_on('cmake@3.11:', type='build')
|
||||||
|
Loading…
Reference in New Issue
Block a user