This commit is contained in:
Vitor Santos Costa
2016-08-23 01:00:14 -05:00
parent 9ed1546ee6
commit 23c1c2d4d7
5 changed files with 25 additions and 15 deletions

View File

@@ -1,25 +1,34 @@
from distutils.core import setup, Extension
import sys
import os
import platform
if platform.system() == 'Darwin':
my_extra_link_args = ['-Wl,-rpath','${dlls}']
else:
my_extra_link_args = []
setup(
name = "yap",
version = "0.1",
ext_modules=[Extension('_yap', ['${CMAKE_SOURCE_DIR}/packages/swig/python/_yap.c'],
ext_modules=[Extension('_yap', ['${CMAKE_SOURCE_DIR}/packages/swig/yap.i'],
define_macros = [('MAJOR_VERSION', '1'),
('MINOR_VERSION', '0'),
('_YAP_NOT_INSTALLED_', '1')],
runtime_library_dirs=['${dlls}'],
runtime_library_dirs=['${dlls}'],
swig_opts=['-modern', '-c++', '-py3','-I${CMAKE_SOURCE_DIR}/CXX'],
library_dirs=['../../..','../../../CXX',
'../../python',
'.'],
libraries=['Yap++','Yap','YAPPython'],
extra_link_args=my_extra_link_args,
libraries=['Yap++','Yap','YAPPython'],
include_dirs=['../../..',
'${CMAKE_SOURCE_DIR}/H',
'${CMAKE_SOURCE_DIR}/H/generated',
'${CMAKE_SOURCE_DIR}/OPTYap',
'${CMAKE_SOURCE_DIR}/os',
'${CMAKE_SOURCE_DIR}/include',
'${CMAKE_SOURCE_DIR}/CXX', '.'],
extra_objects = ['${CMAKE_CURRENT_BINARY_DIR}/_Py2YAP${CMAKE_SHARED_MODULE_SUFFIX}' ]
'${CMAKE_SOURCE_DIR}/CXX', '.']
)],
py_modules = ['yap']
)