petsc4py: workaround LDSHARED change in 3cc5b7adc7
(#21541)
This commit is contained in:
parent
9d8b8553f1
commit
66dc7d8c53
2 changed files with 15 additions and 0 deletions
13
var/spack/repos/builtin/packages/py-petsc4py/ldshared.patch
Normal file
13
var/spack/repos/builtin/packages/py-petsc4py/ldshared.patch
Normal 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):
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue