From 1ba81fcb97d28f669d8d7baa008592c709be6b8c Mon Sep 17 00:00:00 2001 From: Rhys-T <108157737+Rhys-T@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:51:38 -0400 Subject: [PATCH] Revert "Merge pull request #762 from Rhys-T/remove-distutils" This reverts commits 1ec6e1a68d00e49dc36b956764bd76956d9f5a15 and ced35f7eb05dc35a48759c551f4d6a0d4e4d927c, reversing changes made to 4d07169eeb7ddd14e1521421fa106347e8333446. --- bin/nur | 2 +- ci/nur/combine.py | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/nur b/bin/nur index 998edbeb0..054e5794e 100755 --- a/bin/nur +++ b/bin/nur @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -p python3 -p nix-prefetch-git -p nix -i python3 +#!nix-shell -p python3 -p nix-prefetch-git -p nix -i python3 -p python3Packages.distutils import sys import os diff --git a/ci/nur/combine.py b/ci/nur/combine.py index 7cb05e445..4003195d6 100644 --- a/ci/nur/combine.py +++ b/ci/nur/combine.py @@ -3,6 +3,7 @@ import os import shutil import subprocess from argparse import Namespace +from distutils.dir_util import copy_tree from pathlib import Path from tempfile import TemporaryDirectory from typing import Dict, List, Optional @@ -50,9 +51,7 @@ def commit_repo(repo: Repo, message: str, path: Path) -> Repo: assert tmp is not None try: - shutil.copytree( - repo_source(repo.name), tmp.name, symlinks=True, dirs_exist_ok=True - ) + copy_tree(repo_source(repo.name), tmp.name, preserve_symlinks=1) shutil.rmtree(repo_path, ignore_errors=True) os.rename(tmp.name, repo_path) tmp = None @@ -161,9 +160,7 @@ def setup_combined() -> None: write_json_file(dict(repos={}), manifest_path) manifest_lib = "lib" - shutil.copytree( - str(ROOT.joinpath("lib")), manifest_lib, symlinks=True, dirs_exist_ok=True - ) + copy_tree(str(ROOT.joinpath("lib")), manifest_lib, preserve_symlinks=1) default_nix = "default.nix" shutil.copy(ROOT.joinpath("default.nix"), default_nix)