petsc4py: workaround LDSHARED change in 3cc5b7adc7 (#21541)

This commit is contained in:
Satish Balay 2021-02-08 11:43:46 -06:00 committed by GitHub
parent 9d8b8553f1
commit 66dc7d8c53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,13 @@
diff --git a/conf/baseconf.py b/conf/baseconf.py
index 8a2466a5bd..73c08b923a 100644
--- a/conf/baseconf.py
+++ b/conf/baseconf.py
@@ -211,7 +211,7 @@ class PetscConfig:
ldshared = getenv('LDSHARED', ldshared)
ldflags = getenv('LDFLAGS', cflags + ' ' + (ldflags or ''))
ldcmd = split_quoted(ld) + split_quoted(ldflags)
- ldshared = [flg for flg in split_quoted(ldshared) if flg not in ldcmd]
+ ldshared = [flg for flg in split_quoted(ldshared) if flg not in ldcmd and (flg.find('/lib/spack/env')<0)]
ldshared = str.join(' ', ldshared)
#
def get_flags(cmd):

View file

@ -31,6 +31,8 @@ class PyPetsc4py(PythonPackage):
variant('mpi', default=True, description='Activates MPI support')
patch('ldshared.patch')
depends_on('py-cython', type='build', when='@develop')
depends_on('python@2.6:2.8,3.3:', type=('build', 'run'))
depends_on('py-setuptools', type='build')