From 3ff287b5df6d488e48458db09786f7399194454e Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Fri, 4 Mar 2022 22:27:09 +0000
Subject: [PATCH 4/5] disable python ext build
---
setup.py | 39 +--------------------------------------
1 file changed, 1 insertion(+), 38 deletions(-)
diff --git a/setup.py b/setup.py
index c45e146..a045b05 100644
--- a/setup.py
+++ b/setup.py
@@ -49,44 +49,7 @@ class CMakeBuild(build_ext):
self.build_extension(ext)
def build_extension(self, ext):
- extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))
-
- build_type = os.environ.get("SONATA_BUILD_TYPE", "Release")
- if self.debug:
- build_type = "Debug"
-
- cmake_args = [
- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir,
- "-DSONATA_TESTS={}".format(os.environ.get("SONATA_TESTS", "OFF")),
- "-DEXTLIB_FROM_SUBMODULES=ON",
- "-DSONATA_PYTHON=ON",
- "-DSONATA_VERSION=" + self.distribution.get_version(),
- "-DCMAKE_BUILD_TYPE={}".format(build_type),
- "-DSONATA_CXX_WARNINGS=OFF",
- '-DPYTHON_EXECUTABLE=' + sys.executable
- ]
-
- build_args = ["--config", build_type,
- "--target", self.target,
- "--",
- "-j{}".format(max(MIN_CPU_CORES, get_cpu_count())),
- ]
-
- if not os.path.exists(self.build_temp):
- os.makedirs(self.build_temp)
-
- env = os.environ.copy()
- env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format(
- env.get("CXXFLAGS", ""), self.distribution.get_version()
- )
-
- subprocess.check_call(
- ["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env
- )
-
- subprocess.check_call(
- ["cmake", "--build", "."] + build_args, cwd=self.build_temp
- )
+ return None
# nearly verbatim from how h5py handles is
--
2.41.0