2013-11-26 18:12:28 -08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
setup.py for Hammer bindings
|
|
|
|
|
"""
|
2013-11-26 19:25:41 -08:00
|
|
|
import os, os.path, sys
|
2013-11-26 18:12:28 -08:00
|
|
|
from distutils.core import setup, Extension
|
|
|
|
|
|
2013-11-26 19:25:41 -08:00
|
|
|
invoked = os.getcwd()
|
2013-11-26 20:00:55 -08:00
|
|
|
if (os.path.dirname(sys.argv[0]) != ''):
|
|
|
|
|
os.chdir(os.path.dirname(sys.argv[0]))
|
2013-11-26 19:25:41 -08:00
|
|
|
|
2013-11-26 18:12:28 -08:00
|
|
|
setup(name="hammer",
|
|
|
|
|
version="0.9.0",
|
|
|
|
|
author="Upstanding Hackers, LLC",
|
2013-11-26 19:09:27 -08:00
|
|
|
author_email="hammer@upstandinghackers.com",
|
|
|
|
|
url="https://github.com/UpstandingHackers/hammer",
|
2013-11-26 18:12:28 -08:00
|
|
|
description="""The Hammer parser combinator library""",
|
2013-11-26 19:25:41 -08:00
|
|
|
ext_modules=[Extension('_hammer', ['hammer.i'],
|
|
|
|
|
swig_opts=['-DHAMMER_INTERNAL__NO_STDARG_H',
|
|
|
|
|
'-I../../'],
|
2013-11-26 19:09:27 -08:00
|
|
|
define_macros=[('SWIG', None)],
|
|
|
|
|
depends=['allocator.h',
|
|
|
|
|
'glue.h',
|
|
|
|
|
'hammer.h',
|
|
|
|
|
'internal.h',],
|
|
|
|
|
extra_compile_args=['-fPIC',
|
|
|
|
|
'-std=gnu99',],
|
2013-11-26 19:25:41 -08:00
|
|
|
include_dirs=['../../'],
|
|
|
|
|
library_dirs=['../../'],
|
2013-11-26 18:12:28 -08:00
|
|
|
libraries=['hammer'],)],
|
2013-11-26 19:09:27 -08:00
|
|
|
|
2013-11-26 18:12:28 -08:00
|
|
|
py_modules=['hammer'],
|
|
|
|
|
)
|
2013-11-26 19:25:41 -08:00
|
|
|
|
|
|
|
|
os.chdir(invoked)
|