include BLDSHARED, $LDFLAGS for default

Issue #31 new
Min RK created an issue

dijitso modules are loaded into Python. As such, it makes sense to me to use Python's own sysconfig to get the initial flags, rather than hardcoding -shared. This should work in more places by default than the current defaults, e.g. avoiding https://bitbucket.org/fenics-project/dolfin/pull-requests/507

import shlex
from distutils import sysconfig
flags = shlex.split(sysconfig.get_config_var('BLDSHARED'))[1:]

This includes things like the Python library dir and -bundle -undefined dynamic_lookup, which are the right flags for macOS, but not currently used.

Additionally, it would probably be appropriate to respect the standard environment variables $CXXFLAGS and $LDFLAGS, etc. in addition to the current support for $CXX.

Do either or both of these seem reasonable?

Comments (0)

  1. Log in to comment