Skip to content

Commit ed5f201

Browse files
Update copytree function to support Python 3.12 (#2672)
* Update `copytree` dependency * Allow copying to an existing dir * Make the copied plugin directory readable and writeable
1 parent ed164b4 commit ed5f201

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kevm-pyk/src/kevm_pyk/kdist/plugin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

33
import shutil
4+
import subprocess
45
import sys
5-
from distutils.dir_util import copy_tree
66
from typing import TYPE_CHECKING
77

88
from pyk.kbuild.utils import k_version
@@ -52,7 +52,9 @@ def context(self) -> dict[str, str]:
5252

5353
class PluginTarget(Target):
5454
def build(self, output_dir: Path, deps: dict[str, Any], args: dict[str, Any], verbose: bool) -> None:
55-
copy_tree(str(config.PLUGIN_DIR), '.')
55+
shutil.copytree(str(config.PLUGIN_DIR), '.', dirs_exist_ok=True)
56+
# Making the plugin directory readable and writable for nix
57+
subprocess.run(['chmod', '-R', 'u+rw', '.'], check=True)
5658
run_process_2(['make', '-j8'])
5759
shutil.copy('./build/krypto/lib/krypto.a', str(output_dir))
5860

0 commit comments

Comments
 (0)