Mapnik: fix runtime error involving py-pycairo and PDF (#13865)
* fix runtime error involving py-pycairo and PDF * Update var/spack/repos/builtin/packages/py-python-mapnik/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * fix env setup
This commit is contained in:
parent
c349759acd
commit
70e4377348
@ -29,7 +29,7 @@ class Mapnik(AutotoolsPackage):
|
||||
depends_on('libjpeg')
|
||||
depends_on('libtiff')
|
||||
depends_on('proj')
|
||||
depends_on('cairo')
|
||||
depends_on('cairo+pdf') # +pdf needed for mapnik.printing
|
||||
depends_on('postgresql', type=('build', 'link', 'run'))
|
||||
depends_on('gdal', type=('build', 'link', 'run'))
|
||||
depends_on('sqlite+rtree', type=('build', 'link', 'run'))
|
||||
@ -37,9 +37,9 @@ class Mapnik(AutotoolsPackage):
|
||||
|
||||
conflicts('%gcc@9.0.0:')
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
def setup_build_environment(self, env):
|
||||
spec = self.spec
|
||||
spack_env.set('GDAL_DATA', spec['gdal'].prefix.share.gdal)
|
||||
env.set('GDAL_DATA', spec['gdal'].prefix.share.gdal)
|
||||
|
||||
def configure_args(self):
|
||||
return [
|
||||
|
@ -20,10 +20,12 @@ class PyPythonMapnik(PythonPackage):
|
||||
depends_on('py-setuptools', type='build')
|
||||
depends_on('mapnik', type=('build', 'link', 'run'))
|
||||
depends_on('boost +python+thread')
|
||||
# py-pycairo is need by mapnik.printing
|
||||
depends_on('py-pycairo', type=('build', 'run'))
|
||||
|
||||
# Package can't find boost_python without the following
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
def setup_build_environment(self, env):
|
||||
# Inform the package that boost python library is of form
|
||||
# 'libboost_python27.so' as opposed to 'libboost_python.so'
|
||||
py_ver = str(self.spec['python'].version.up_to(2).joined)
|
||||
spack_env.set('BOOST_PYTHON_LIB', 'boost_python' + py_ver)
|
||||
env.set('BOOST_PYTHON_LIB', 'boost_python' + py_ver)
|
||||
|
Loading…
Reference in New Issue
Block a user