This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/swig/python/setup.py.cmake

39 lines
1.5 KiB
CMake
Raw Normal View History

2016-08-22 04:01:38 +01:00
from distutils.core import setup, Extension
2016-08-23 07:00:14 +01:00
import sys
import os
import platform
2016-07-31 16:32:50 +01:00
2016-08-23 07:00:14 +01:00
if platform.system() == 'Darwin':
2016-08-23 21:08:36 +01:00
my_extra_link_args = ['-Wl,-rpath','-Wl,${dlls}']
2016-08-23 07:00:14 +01:00
else:
my_extra_link_args = []
2016-12-10 07:01:10 +00:00
python_sources = ['${CMAKE_CURRENT_SOURCE_DIR}/../yap.i']
2016-12-10 07:01:10 +00:00
2016-07-31 16:32:50 +01:00
setup(
name = "yap",
version = "0.1",
2016-12-10 07:01:10 +00:00
ext_modules=[Extension('_yap', python_sources,
2016-07-31 16:32:50 +01:00
define_macros = [('MAJOR_VERSION', '1'),
('MINOR_VERSION', '0'),
2016-10-16 23:18:51 +01:00
('_YAP_NOT_INSTALLED_', '1'),
('YAP_PYTHON', '1')],
runtime_library_dirs=[,'$(bindir)'],
2016-08-25 18:10:33 +01:00
swig_opts=['-modern','-outcurrentdir', '-c++', '-py3','-I${CMAKE_SOURCE_DIR}/CXX'],
library_dirs=["${dlls}","${bindir}",
2016-08-23 01:18:33 +01:00
'.'],
2016-08-23 07:00:14 +01:00
extra_link_args=my_extra_link_args,
libraries=['Yap','{GMP_LIBRARIES}'],
2016-07-31 16:32:50 +01:00
include_dirs=['../../..',
2016-08-23 21:08:36 +01:00
'${GMP_INCLUDE_DIRS}',
2016-07-31 16:32:50 +01:00
'${CMAKE_SOURCE_DIR}/H',
'${CMAKE_SOURCE_DIR}/H/generated',
'${CMAKE_SOURCE_DIR}/OPTYap',
'${CMAKE_SOURCE_DIR}/os',
'${CMAKE_SOURCE_DIR}/include',
2016-08-23 07:00:14 +01:00
'${CMAKE_SOURCE_DIR}/CXX', '.']
2016-07-31 16:32:50 +01:00
)],
py_modules = ['yap', '${CMAKE_SOURCE_DIR}/packages/python/yapex']
2016-07-31 16:32:50 +01:00
)