1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#!/usr/bin/env python
"""
setup.py file for SWIG example
"""
import sys
import os.path
def get_rootdir():
return os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
def get_includedir():
return os.path.join(get_rootdir(), 'include')
def get_swigdir():
return os.path.join(get_rootdir(), 'swig')
import os; os.environ['CC'] = 'g++'; os.environ['CXX'] = 'g++';
os.environ['CPP'] = 'g++'; os.environ['LDSHARED'] = 'g++'
from distutils.core import setup, Extension
simstring_module = Extension(
'_simstring',
sources = [
'export.cpp',
'export_wrap.cpp',
],
include_dirs=[get_includedir(),],
extra_link_args=['-shared'],
language='c++',
)
setup(
name = '@PACKAGE@',
version = '@VERSION@',
author = 'Naoaki Okazaki',
description = """SimString Python module""",
ext_modules = [simstring_module],
py_modules = ["simstring"],
)
|