diff --git a/setup.py b/setup.py index ddc57ae..0396cb5 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ import os, sys import optparse +import platform -from setuptools import setup -from distutils.extension import Extension +from setuptools import setup, Extension from datetime import datetime @@ -37,14 +37,22 @@ # Major number is Yices Version, minor number creation date of the bindings YICESPY_VERSION='%s.%s' % (YICES_VERSION, YICESPY_MINOR_VERSION) +extra_include = [] +if 'C_INCLUDE_PATH' in os.environ: + extra_include.append(os.environ['C_INCLUDE_PATH']) +libraries = ['yices'] +runtime_libraries=[os.path.join(YICES_DIR, "lib")] +if platform.system() == 'Windows': + libraries = ['libyices', 'psapi', 'mpir'] + runtime_libraries = [] yices_ext = Extension('_yicespy', ['yices_python.i'], swig_opts=['-I%s'%os.path.join(YICES_DIR, "include")], - include_dirs=[os.path.join(YICES_DIR, "include"),os.environ['C_INCLUDE_PATH']], + include_dirs=[os.path.join(YICES_DIR, "include")], library_dirs=[os.path.join(YICES_DIR, "lib")], - runtime_library_dirs=[os.path.join(YICES_DIR, "lib")], - libraries=['yices'], - language='c', + runtime_library_dirs=runtime_libraries, + libraries=libraries, + language='c++', ) short_description="Yices SMT-Solver Wrapper" diff --git a/yices_python.i b/yices_python.i index 2049a9d..4851534 100644 --- a/yices_python.i +++ b/yices_python.i @@ -241,7 +241,10 @@ int32_t yices_get_rational64_value(model_t *mdl, term_t t, int64_t *OUTPUT, uint __YICES_DLLSPEC__ extern int32_t yices_get_bv_value_width(model_t *mdl, term_t t, uint32_t width, - int32_t val[]) + int32_t val[]); + +int32_t yices_get_bv_value_width(model_t *mdl, term_t t, uint32_t width, + int32_t val[]) { return yices_get_bv_value(mdl, t, val); }