From b8b420cb22f05b35cd664defcc3363f3a647115d Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Thu, 11 Apr 2024 09:02:19 -0500 Subject: [PATCH] fix: allows vyper 4 to work --- ape_vyper/compiler.py | 7 +++---- setup.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ape_vyper/compiler.py b/ape_vyper/compiler.py index e7691fd0..cb98def8 100644 --- a/ape_vyper/compiler.py +++ b/ape_vyper/compiler.py @@ -412,13 +412,12 @@ def compile( for vyper_version, version_settings in all_settings.items(): for settings_key, settings in version_settings.items(): - source_ids = settings["outputSelection"] - optimization_paths = {p: base_path / p for p in source_ids} + source_paths = settings["outputSelection"] input_json = { "language": "Vyper", "settings": settings, "sources": { - s: {"content": p.read_text()} for s, p in optimization_paths.items() + p: {"content": Path(p).read_text()} for p in source_paths }, } @@ -769,7 +768,7 @@ def get_compiler_settings( version_settings[settings_key] = { "optimize": optimization, - "outputSelection": {s: ["*"] for s in selection}, + "outputSelection": {(base_path / s).as_posix(): ["*"] for s in selection}, } if evm_version and evm_version not in ("none", "null"): version_settings[settings_key]["evmVersion"] = f"{evm_version}" diff --git a/setup.py b/setup.py index 8f83010c..3c6982dd 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ "ethpm-types", # Use same version as eth-ape "tqdm", # Use same version as eth-ape "vvm>=0.2.0,<0.3", - "vyper~=0.3.7", + "vyper>=0.3.7,<0.5" ], python_requires=">=3.8,<4", extras_require=extras_require,