(source, destination)
| 203 | |
| 204 | |
| 205 | def _link_or_copy(source, destination): |
| 206 | # Prefer symlinks (faster, no disk use) but fall back to copying when the |
| 207 | # filesystem doesn't support them (e.g. Docker volumes, network mounts). |
| 208 | if sys.platform != "win32": |
| 209 | try: |
| 210 | os.symlink(source, destination) |
| 211 | return |
| 212 | except OSError: |
| 213 | pass |
| 214 | |
| 215 | if source.is_dir(): |
| 216 | shutil.copytree(source, destination, symlinks=(sys.platform != "win32")) |
| 217 | else: |
| 218 | shutil.copy2(source, destination) |
| 219 | |
| 220 | |
| 221 | def _create_importable_pyarrow(pyarrow_pkg, source_dir, install_pyarrow_dir): |
no test coverage detected