Write a CPython version in a directory.
(dest_path: pathlib.Path, version: str)
| 230 | |
| 231 | |
| 232 | def write_cpython_version(dest_path: pathlib.Path, version: str): |
| 233 | """Write a CPython version in a directory.""" |
| 234 | dest_path.mkdir(parents=True, exist_ok=True) |
| 235 | |
| 236 | major_minor = ".".join(version.split(".")[:2]) |
| 237 | k = "cpython-%s" % major_minor |
| 238 | p = dest_path / ("VERSION.%s" % k) |
| 239 | content = "%s_VERSION := %s\n" % (k.upper().replace("-", "_"), version) |
| 240 | write_if_different(p, content.encode("ascii")) |
| 241 | |
| 242 | |
| 243 | def write_target_settings(targets, dest_path: pathlib.Path): |
no test coverage detected