From 30d5a9a56e035e02a655e2649e270492a3b25ea8 Mon Sep 17 00:00:00 2001 From: Freeman <105403280+F-WRunTime@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:10:38 -0700 Subject: [PATCH 1/2] Pin Python version for code quality checks. pin python version on public runners. https://github.com/runtimeverification/evm-semantics/actions/runs/12629580595/job/35187761558#step:4:86 Public runners use python version determined by Github. --- .github/workflows/test-pr.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index b3cdc34f67..a897ddbef8 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -12,6 +12,10 @@ jobs: name: 'Code Quality Checks' runs-on: ubuntu-latest steps: + - name: 'Setup Python 3.10' + uses: actions/setup-python@v5 + with: + python-version: '3.10' - name: 'Check out code' uses: actions/checkout@v4 - name: 'Install Poetry' From 88861a840e0e1a7539e9cdbfaeea29a1f59939f2 Mon Sep 17 00:00:00 2001 From: Palina Date: Mon, 6 Jan 2025 20:27:52 +0400 Subject: [PATCH 2/2] 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 --- kevm-pyk/src/kevm_pyk/kdist/plugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kevm-pyk/src/kevm_pyk/kdist/plugin.py b/kevm-pyk/src/kevm_pyk/kdist/plugin.py index c16d80bd05..184679b4d4 100644 --- a/kevm-pyk/src/kevm_pyk/kdist/plugin.py +++ b/kevm-pyk/src/kevm_pyk/kdist/plugin.py @@ -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 @@ -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))