distutils being invoked from scons; ld is failing with 'libhammer.a: archive has no index, run ranlib to add one'

This commit is contained in:
Meredith L. Patterson 2013-11-26 19:09:27 -08:00
parent 1e0f3744f8
commit 53bc886e2f
2 changed files with 27 additions and 17 deletions

View file

@ -3,20 +3,28 @@
"""
setup.py for Hammer bindings
"""
import os.path, sys
from distutils.core import setup, Extension
setup(name="hammer",
version="0.9.0",
author="Upstanding Hackers, LLC",
author_email="hammer@upstandinghackers.com",
url="https://github.com/UpstandingHackers/hammer",
description="""The Hammer parser combinator library""",
ext_modules=[Extension('_hammer', ['hammer.i'],
swig_opts=['-DHAMMER_INTERNAL__NO_STDARG_H', '-I../../'],
define_macros = [('SWIG', None)],
extra_compile_args = ['-fPIC',
'-std=gnu99',],
include_dirs=['../../'],
library_dirs=['../../'],
ext_modules=[Extension('_hammer', [os.path.join(os.path.dirname(sys.argv[0]),
'hammer.i')],
# swig_opts is set by SConscript
define_macros=[('SWIG', None)],
depends=['allocator.h',
'glue.h',
'hammer.h',
'internal.h',],
extra_compile_args=['-fPIC',
'-std=gnu99',],
include_dirs=['src'],
library_dirs=['src'],
libraries=['hammer'],)],
py_modules=['hammer'],
)