From 7e3109b879a59dbb45156ab45ca13bc78c925399 Mon Sep 17 00:00:00 2001 From: panpilkarz Date: Tue, 9 May 2023 14:47:29 +0200 Subject: [PATCH 1/2] Add make install --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index ce82dc9f0..31fd460f5 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ CONTRACTS = "contracts/**/*.sol" DIFFLINT_PY_RE = "( M|A ) (beamer/|scripts/)" DIFFLINT_SOL_RE = "( M|A ) contracts/.*sol" IMAGE_NAME := beamer +ARCH := $(shell uname -m) all: lint @@ -82,3 +83,13 @@ clean: rm -rf deployments/dist find . -type d -name __pycache__ -exec rm -rf {} + find . -type d -name .mypy_cache -exec rm -rf {} + + +install: + yarn install + poetry install +ifeq ($(ARCH),arm64) + $(eval ATOMICS := $(shell poetry export | grep -E 'atomics==' | awk '{print $$1}')) + $(eval VENV := $(shell poetry run poetry env info -p)) + poetry run pip uninstall atomics -y + poetry run pip install $(ATOMICS) --platform=universal2 --no-deps --target $(VENV)/lib/python*/site-packages +endif From 4f97b295579c3871497ebeb574e81e9e232e5726 Mon Sep 17 00:00:00 2001 From: panpilkarz Date: Fri, 12 May 2023 11:29:09 +0200 Subject: [PATCH 2/2] Update docs --- docs/source/contributing.rst | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 7b9f99cc6..c0e72d50c 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -5,7 +5,7 @@ Requirements ------------ - `Python `_ 3.10 -- `poetry `_ +- `poetry `_ 1.4 - `ganache `_ 7 - `jq `_ - `coreutils `_ @@ -27,13 +27,9 @@ If you already have a repository, make sure the submodules are up to date:: Testing ------- -First make sure that the node dependencies are installed:: +First install node and python dependencies:: - yarn install - -Then, install python dependencies:: - - poetry install + make install Then enter the virtual environment:: @@ -49,7 +45,7 @@ Build the relayers:: Start ganache:: - ganache --wallet.totalAccounts 10 --chain.hardfork london --miner.blockGasLimit 12000000 \ + npx ganache --wallet.totalAccounts 10 --chain.hardfork london --miner.blockGasLimit 12000000 \ --wallet.mnemonic brownie --server.port 8545 --chain.chainId 1337 Create a JSON keyfile corresponding to one of the accounts pre-funded by ganache::