--lib-only only build the library, but not the executable or
the parser (default: off)
+CMake Options (Advanced)
+ -DVAR=VALUE manually add CMake options
+
EOF
exit 0
}
#--------------------------------------------------------------------------#
+cmake_opts=""
+
while [ $# -gt 0 ]
do
case $1 in
--dep-path=*) dep_path="${dep_path};${1##*=}" ;;
--lib-only) lib_only=ON ;;
+ -D*) cmake_opts="${cmake_opts} $1" ;;
-*) die "invalid option '$1' (try -h)";;
export CXXFLAGS=-Werror
fi
-cmake_opts=""
-
[ $buildtype != default ] \
&& cmake_opts="$cmake_opts -DCMAKE_BUILD_TYPE=$buildtype"
${CMAKE_BINARY_DIR}/src # for cvc5_export.h
)
-target_link_libraries(pycvc5 cvc5 ${PYTHON_LIBRARIES})
+target_link_libraries(pycvc5 cvc5)
# Disable -Werror and other warnings for code generated by Cython.
# Note: Visibility is reset to default here since otherwise the PyInit_...
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
+from skbuild.cmaker import CMaker
from distutils.version import LooseVersion
-WORKING_DIR="build-python-wheel"
+WORKING_DIR="build"
def get_project_src_path():
# expecting this script to be in src/api/python/wheels
'--auto-download',
'--lib-only',
'--name='+WORKING_DIR]
+ # find correct Python include directory and library
+ # works even for nonstandard Python installations
+ # (e.g., on pypa/manylinux)
+ args.append('-DPYTHON_VERSION_STRING:STRING=' + \
+ sys.version.split(' ')[0])
+ python_version = CMaker.get_python_version()
+ args.append('-DPYTHON_INCLUDE_DIR:PATH=' + \
+ CMaker.get_python_include_dir(python_version))
+ args.append('-DPYTHON_LIBRARY:FILEPATH=' + \
+ CMaker.get_python_library(python_version))
+
config_filename = os.path.join(project_src_path, "configure.sh")
subprocess.check_call([config_filename] + args)