feat(runner): Support initialized accounts + misc fixes.

Simplifies a lot the setup of testing:

- Looks up tycho-indexer under the usual paths no OS specific naming necessary.
- Simply assumes that protosim can be pulled from our private PyPi
- Navigates the foundry out folder to find solidity runtime binaries

Includes some additional fixes to deal with some attribtues that may have to be reflected to defibot later on.
This commit is contained in:
kayibal
2024-07-25 19:31:47 +01:00
parent fcaae2f643
commit 4c337a36d1
7 changed files with 93 additions and 87 deletions

View File

@@ -1,7 +1,4 @@
from setuptools import setup, find_packages
import sys
import platform
from pathlib import Path
def read_requirements():
@@ -11,25 +8,6 @@ def read_requirements():
return [req for req in requirements if req and not req.startswith("#")]
# Determine the correct wheel file based on the platform and Python version
def get_wheel_file():
path = Path(__file__).parent
if sys.platform.startswith("darwin") and platform.machine() == "arm64":
return str(
path / "wheels" / f"protosim_py-0.4.9-cp39-cp39-macosx_11_0_arm64.whl"
)
elif sys.platform.startswith("linux") and platform.machine() == "x86_64":
return str(
path
/ "wheels"
/ f"protosim_py-0.4.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
)
else:
raise RuntimeError("Unsupported platform or architecture")
wheel_file = get_wheel_file()
setup(
name="tycho-client",
version="0.1.0",
@@ -51,7 +29,7 @@ setup(
"eth-utils==1.9.5",
"hexbytes==0.3.1",
"pydantic==2.8.2",
f"protosim_py @ file://{wheel_file}",
"protosim_py==0.4.11",
],
package_data={"tycho-client": ["../wheels/*", "./assets/*", "./bins/*"]},
include_package_data=True,