MCPcopy Create free account
hub / github.com/catboost/catboost / gen_cmd

Method gen_cmd

catboost/python-package/mk_wheel.py:53–81  ·  view source on GitHub ↗
(self, arc_path, module_name, task_type)

Source from the content-addressed store, hash-verified

51 self.py_config, self.lang = self.get_python_info()
52
53 def gen_cmd(self, arc_path, module_name, task_type):
54 if self.build_system == BUILD_SYSTEM.CMAKE:
55 cmd = ([
56 'cd', arc_root,
57 'cmake',
58 '-B', self.out_root,
59 '-G', '"Unix Makefiles"',
60 '-DCMAKE_BUILD_TYPE=Release',
61 '-DCMAKE_TOOLCHAIN_FILE=' + os.path.join(self.arc_root, 'catboost', 'build', 'toolchains', 'clang.toolchain'),
62 '-DCMAKE_POSITION_INDEPENDENT_CODE=On'
63 ] + self.tail_args + [
64 '&&'
65 'cd', self.tmp_build_dir,
66 '&&',
67 'make', module_name
68 ])
69 elif self.build_system == BUILD_SYSTEM.YA:
70 cmd = [
71 sys.executable, arc_root + '/ya', 'make', os.path.join(arc_root, arc_path),
72 '--no-src-links', '-r', '--output', out_root, '-DPYTHON_CONFIG=' + self.py_config, '-DNO_DEBUGINFO', '-DOS_SDK=local',
73 '-DHAVE_CUDA=yes' if task_type == 'GPU' else '-DHAVE_CUDA=no'
74 ]
75
76 if not self.python_version.from_sandbox:
77 cmd += ['-DUSE_ARCADIA_PYTHON=no']
78 cmd += extra_opts(self._on_win())
79
80 cmd += self.tail_args
81 return cmd
82
83 def get_python_info(self):
84 if self.python_version.major == 2:

Callers 1

buildFunction · 0.95

Calls 3

_on_winMethod · 0.95
extra_optsFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected