1 Debian patch touch this file
-
Use path to Debian's python3 interpreter
- Author
- Diane Trout <[email protected]>
- Forwarded
- no
| •1 | #!/usr/bin/python3 |
| 2 | import os |
| 3 | import shutil |
| 4 | from pathlib import Path |
| 5 | |
| 6 | dist_root: str = os.getenv("MESON_DIST_ROOT") # type: ignore |
| 7 | build_root: str = os.getenv("MESON_BUILD_ROOT") # type: ignore |
| 8 | |
| 9 | |
| 10 | def copy_to_dist(rel_path: str) -> None: |
| 11 | """ |
| 12 | Copy file at rel_path to the sdist directory |
| 13 | """ |
| 14 | src = Path(build_root) / rel_path |
| 15 | dest = Path(dist_root) / rel_path |
| 16 | if src.exists(): |
| 17 | shutil.copy(src, dest) |
| 18 | |
| 19 | |
| 20 | if __name__ == "__main__": |
| 21 | copy_to_dist("skmisc/_version.py") |