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

Method _move_exec_to_root

numpy/f2py/_backends/_meson.py:130–143  ·  view source on GitHub ↗
(self, build_dir: Path)

Source from the content-addressed store, hash-verified

128 )
129
130 def _move_exec_to_root(self, build_dir: Path):
131 walk_dir = Path(build_dir) / self.meson_build_dir
132 path_objects = chain(
133 walk_dir.glob(f"{self.modulename}*.so"),
134 walk_dir.glob(f"{self.modulename}*.pyd"),
135 )
136 # Same behavior as distutils
137 # https://github.com/numpy/numpy/issues/24874#issuecomment-1835632293
138 for path_object in path_objects:
139 dest_path = Path.cwd() / path_object.name
140 if dest_path.exists():
141 dest_path.unlink()
142 shutil.copy2(path_object, dest_path)
143 os.remove(path_object)
144
145 def write_meson_build(self, build_dir: Path) -> None:
146 """Writes the meson build file at specified location"""

Callers 1

compileMethod · 0.95

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected