MCPcopy Index your code
hub / github.com/couchbase/couchbase-python-client / run

Method run

pycbc_build_setup.py:250–268  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

248 return
249
250 def run(self) -> None:
251 check_for_cmake()
252 process_build_env_vars()
253 build_ext = self.get_finalized_command('build_ext')
254 if len(self.distribution.ext_modules) != 1:
255 raise SetupError('Should have only the Python SDK extension module.')
256 ext = self.distribution.ext_modules[0]
257 output_dir = os.path.abspath(os.path.dirname(build_ext.get_ext_fullpath(ext.name)))
258 set_cpm_cache = os.environ.get('PYCBC_SET_CPM_CACHE', 'true').lower() in ENV_TRUE
259 cmake_config = CMakeConfig.create_cmake_config(output_dir, ext.sourcedir, set_cpm_cache=set_cpm_cache)
260 if not os.path.exists(build_ext.build_temp):
261 os.makedirs(build_ext.build_temp)
262 print(f'cmake config args: {cmake_config.config_args}')
263 # configure (i.e. cmake ..)
264 subprocess.check_call(cmake_config.config_args, # nosec
265 cwd=build_ext.build_temp,
266 env=cmake_config.env)
267
268 self._clean_cache_cpm_dependencies()
269
270 def _clean_cache_cpm_dependencies(self):
271 import re

Calls 6

check_for_cmakeFunction · 0.85
process_build_env_varsFunction · 0.85
create_cmake_configMethod · 0.80
getMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected