Commit c8120a79 authored by Stefan Behnel's avatar Stefan Behnel

link statically against libpython in BuildExecutable (hack to make it work if...

link statically against libpython in BuildExecutable (hack to make it work if libpython is in a non-standard directory)
parent 6fcea273
...@@ -20,8 +20,6 @@ INCDIR = sysconfig.get_python_inc() ...@@ -20,8 +20,6 @@ INCDIR = sysconfig.get_python_inc()
LIBDIR1 = get_config_var('LIBDIR') LIBDIR1 = get_config_var('LIBDIR')
LIBDIR2 = get_config_var('LIBPL') LIBDIR2 = get_config_var('LIBPL')
PYLIB = get_config_var('LIBRARY') PYLIB = get_config_var('LIBRARY')
if PYLIB:
PYLIB = '-l%s' % PYLIB[3:-2]
CC = get_config_var('CC') CC = get_config_var('CC')
CFLAGS = get_config_var('CFLAGS') + ' ' + os.environ.get('CFLAGS', '') CFLAGS = get_config_var('CFLAGS') + ' ' + os.environ.get('CFLAGS', '')
...@@ -66,7 +64,8 @@ def runcmd(cmd, shell=True): ...@@ -66,7 +64,8 @@ def runcmd(cmd, shell=True):
sys.exit(returncode) sys.exit(returncode)
def clink(basename): def clink(basename):
runcmd([LINKCC, '-o', basename, basename+'.o', '-L'+LIBDIR1, '-L'+LIBDIR2, PYLIB] runcmd([LINKCC, '-o', basename, basename+'.o', '-L'+LIBDIR1, '-L'+LIBDIR2,
os.path.join(LIBDIR1, PYLIB)]
+ LIBS.split() + SYSLIBS.split() + LINKFORSHARED.split()) + LIBS.split() + SYSLIBS.split() + LINKFORSHARED.split())
def ccompile(basename): def ccompile(basename):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment