MCPcopy Create free account
hub / github.com/numpy/numpy / run

Method run

numpy/distutils/command/install_clib.py:18–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

16 self.set_undefined_options('install', ('install_lib', 'install_dir'))
17
18 def run (self):
19 build_clib_cmd = get_cmd("build_clib")
20 if not build_clib_cmd.build_clib:
21 # can happen if the user specified `--skip-build`
22 build_clib_cmd.finalize_options()
23 build_dir = build_clib_cmd.build_clib
24
25 # We need the compiler to get the library name -> filename association
26 if not build_clib_cmd.compiler:
27 compiler = new_compiler(compiler=None)
28 compiler.customize(self.distribution)
29 else:
30 compiler = build_clib_cmd.compiler
31
32 for l in self.distribution.installed_libraries:
33 target_dir = os.path.join(self.install_dir, l.target_dir)
34 name = compiler.library_filename(l.name)
35 source = os.path.join(build_dir, name)
36 self.mkpath(target_dir)
37 self.outfiles.append(self.copy_file(source, target_dir)[0])
38
39 def get_outputs(self):
40 return self.outfiles

Callers

nothing calls this directly

Calls 5

get_cmdFunction · 0.90
new_compilerFunction · 0.90
customizeMethod · 0.80
finalize_optionsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected