You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by jm...@apache.org on 2019/08/28 22:27:51 UTC
[incubator-datasketches-cpp] 01/01: update setup.py to work with
WITH_PYTHON cmake option
This is an automated email from the ASF dual-hosted git repository.
jmalkin pushed a commit to branch python_build_flag
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-cpp.git
commit 5932278ee8102087fa3147a7ec41e4e909edec26
Author: jmalkin <jm...@users.noreply.github.com>
AuthorDate: Wed Aug 28 15:27:30 2019 -0700
update setup.py to work with WITH_PYTHON cmake option
---
CMakeLists.txt | 5 ++++-
setup.py | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71bcb8a..15ca987 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,7 +63,10 @@ add_subdirectory(cpc)
add_subdirectory(kll)
add_subdirectory(fi)
add_subdirectory(theta)
-add_subdirectory(python)
+
+if (WITH_PYTHON)
+ add_subdirectory(python)
+endif()
target_link_libraries(datasketches PUBLIC hll cpc kll fi theta)
diff --git a/setup.py b/setup.py
index c941ade..8d34fcc 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,8 @@ class CMakeBuild(build_ext):
def build_extension(self, ext):
extdir = os.path.abspath(
os.path.dirname(self.get_ext_fullpath(ext.name)))
- cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir]
+ cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir]
+ cmake_args += ['-DWITH_PYTHON=True']
cfg = 'Debug' if self.debug else 'Release'
build_args = ['--config', cfg]
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org