Skip to content

Commit

Permalink
Update copytree function to support Python 3.12 (#2672)
Browse files Browse the repository at this point in the history
* Update `copytree` dependency

* Allow copying to an existing dir

* Make the copied plugin directory readable and writeable
  • Loading branch information
palinatolmach committed Jan 6, 2025
1 parent 30d5a9a commit 88861a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kevm-pyk/src/kevm_pyk/kdist/plugin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

import shutil
import subprocess
import sys
from distutils.dir_util import copy_tree
from typing import TYPE_CHECKING

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

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

Expand Down

0 comments on commit 88861a8

Please sign in to comment.