diff options
-rw-r--r-- | var/spack/repos/builtin/packages/py-gpaw/libxc.patch | 12 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-gpaw/package.py | 19 |
2 files changed, 28 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-gpaw/libxc.patch b/var/spack/repos/builtin/packages/py-gpaw/libxc.patch new file mode 100644 index 0000000000..09a992876e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gpaw/libxc.patch @@ -0,0 +1,12 @@ +diff -Naur gpaw-1.3.0.orig/c/xc/libxc.c gpaw-1.3.0/c/xc/libxc.c +--- gpaw-1.3.0.orig/c/xc/libxc.c 2019-09-06 14:59:35.151442058 +0300 ++++ gpaw-1.3.0/c/xc/libxc.c 2019-09-06 15:00:46.211440365 +0300 +@@ -801,7 +801,7 @@ + if (!PyArg_ParseTuple(args, "dOOOOOO", + &c, &n_g, &sigma_g, &lapl_g, &tau_g, &v_g, &vx_g)) + return NULL; +- xc_mgga_x_tb09_set_params(self->functional[0], c); ++ xc_func_set_ext_params(self->functional[0], &c); + xc_mgga_vxc(self->functional[0], PyArray_DIM(n_g, 0), + PyArray_DATA(n_g), + PyArray_DATA(sigma_g), diff --git a/var/spack/repos/builtin/packages/py-gpaw/package.py b/var/spack/repos/builtin/packages/py-gpaw/package.py index b7b0a8301c..04137f3986 100644 --- a/var/spack/repos/builtin/packages/py-gpaw/package.py +++ b/var/spack/repos/builtin/packages/py-gpaw/package.py @@ -14,16 +14,19 @@ class PyGpaw(PythonPackage): homepage = "https://wiki.fysik.dtu.dk/gpaw/index.html" url = "https://pypi.io/packages/source/g/gpaw/gpaw-1.3.0.tar.gz" + version('19.8.1', sha256='79dee367d695d68409c4d69edcbad5c8679137d6715da403f6c2500cb2178c2a') version('1.3.0', '82e8c80e637696248db00b5713cdffd1') variant('mpi', default=True, description='Build with MPI support') - variant('scalapack', default=False, + variant('scalapack', default=True, description='Build with ScaLAPACK support') variant('fftw', default=True, description='Build with FFTW support') depends_on('mpi', when='+mpi', type=('build', 'link', 'run')) - depends_on('python@2.6:') - depends_on('py-ase@3.13.0:', type=('build', 'run')) + depends_on('python@2.6:', type=('build', 'run'), when='@:1.3.0') + depends_on('python@3.5:', type=('build', 'run'), when='@19.8.1:') + depends_on('py-ase@3.13.0:', type=('build', 'run'), when='@1.3.0') + depends_on('py-ase@3.18.0:', type=('build', 'run'), when='@19.8.1') depends_on('py-numpy +blas +lapack', type=('build', 'run')) depends_on('py-scipy', type=('build', 'run')) depends_on('libxc') @@ -33,6 +36,8 @@ class PyGpaw(PythonPackage): depends_on('fftw~mpi', when='+fftw ~mpi') depends_on('scalapack', when='+scalapack') + patch('libxc.patch', when='@1.3.0') + def patch(self): spec = self.spec # For build notes see https://wiki.fysik.dtu.dk/gpaw/install.html @@ -41,8 +46,16 @@ class PyGpaw(PythonPackage): blas = spec['blas'] lapack = spec['lapack'] + python_include = spec['python'].headers.directories[0] + numpy_include = join_path( + spec['py-numpy'].prefix, + spec['python'].package.site_packages_dir, + 'numpy', 'core', 'include') + libs = blas.libs + lapack.libs + libxc.libs include_dirs = [ + python_include, + numpy_include, blas.prefix.include, lapack.prefix.include, libxc.prefix.include |