From 0d63f10bff24d163ef1ba03df63d4523e0cc4faf Mon Sep 17 00:00:00 2001 From: mhh Date: Sun, 7 Apr 2024 08:22:18 +0200 Subject: [PATCH 1/5] Fix hashing for caching dependencies --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index ced2a661..28761610 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-build-wheels-${{ hashFiles('setup.cfg', 'setup.py') }} + key: ${{ runner.os }}-build-wheels-${{ hashFiles('pyproject.toml') }} restore-keys: | ${{ runner.os }}-build-wheels- From a6b707788ac77e5b8387a404c62df4a3edeafcdf Mon Sep 17 00:00:00 2001 From: mhh Date: Sun, 7 Apr 2024 08:39:23 +0200 Subject: [PATCH 2/5] Install dependencies before build --- .github/workflows/build-wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 28761610..ca5e8f0c 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -57,6 +57,7 @@ jobs: - name: Build source and wheel packages run: | + python3 -m pip install . python3 -m build - name: Install the Python wheel From 1f4df475f458245b50ff7c6dac6bc1de332a168b Mon Sep 17 00:00:00 2001 From: mhh Date: Mon, 8 Apr 2024 12:19:15 +0200 Subject: [PATCH 3/5] Fix build with using Hatch --- .github/workflows/build-wheels.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index ca5e8f0c..5155bc7e 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -50,23 +50,19 @@ jobs: sudo apt-get -y upgrade sudo apt-get install -y libsecp256k1-dev - - name: Install required Python packages + - name: Install Hatch run: | - python3 -m pip install --upgrade build - python3 -m pip install --user --upgrade twine + python3 -m pip install --upgrade hatch - name: Build source and wheel packages run: | - python3 -m pip install . - python3 -m build + python3 -m hatch build - name: Install the Python wheel run: | python3 -m pip install dist/aleph_sdk_python-*.whl - name: Import and use the package - # macos tests fail this step because they use Python 3.11, which is not yet supported by our dependencies - if: startsWith(matrix.os, 'ubuntu-') run: | python3 -c "import aleph.sdk" python3 -c "from aleph.sdk.chains.ethereum import get_fallback_account; get_fallback_account()" From 37284d42c57877c9aa4193659cae96b987baa175 Mon Sep 17 00:00:00 2001 From: mhh Date: Mon, 8 Apr 2024 12:48:07 +0200 Subject: [PATCH 4/5] Restrict eth-account version < 0.12.0 due to incompatible pydantic requirement; Remove ethereum extra package, as it was already contained in main package --- README.md | 3 +-- pyproject.toml | 9 ++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 88117865..cfc7e1a4 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,10 @@ $ pip install aleph-sdk-python Some functionalities require additional dependencies. They can be installed like this: ```shell -$ pip install aleph-sdk-python[ethereum, dns] +$ pip install aleph-sdk-python[solana, dns] ``` The following extra dependencies are available: -- `ethereum` for Ethereum and Ethereum-compatible chains - `solana` for Solana accounts and signatures - `cosmos` for Substrate/Cosmos accounts and signatures - `nuls2` for NULS2 accounts and signatures diff --git a/pyproject.toml b/pyproject.toml index 832084d6..f0bd0838 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ dependencies = [ "coincurve; python_version<\"3.11\"", "coincurve>=17.0.0; python_version>=\"3.11\"", "eth_abi>=4.0.0; python_version>=\"3.11\"", - "eth_account>=0.4.0", + "eth_account>=0.4.0,<0.12.0", "python-magic", "typer", "typing_extensions", @@ -43,10 +43,6 @@ dns = [ docs = [ "sphinxcontrib-plantuml", ] -ethereum = [ - "eth_abi>=4.0.0; python_version>=\"3.11\"", - "eth_account>=0.4.0", -] ledger = [ "ledgereth==0.9.0", ] @@ -75,7 +71,7 @@ encryption = [ "eciespy>=0.3.13; python_version>=\"3.11\"", ] all = [ - "aleph-sdk-python[cosmos,dns,docs,ethereum,ledger,mqtt,nuls2,polkadot,solana,tezos,encryption]", + "aleph-sdk-python[cosmos,dns,docs,ledger,mqtt,nuls2,polkadot,solana,tezos,encryption]", ] [project.urls] @@ -111,7 +107,6 @@ python = ["3.8", "3.9", "3.10", "3.11"] features = [ "cosmos", "dns", - "ethereum", "ledger", "nuls2", "polkadot", From ca2bfda105e995b748b30864d0e8276a23376f5c Mon Sep 17 00:00:00 2001 From: mhh Date: Mon, 8 Apr 2024 12:53:50 +0200 Subject: [PATCH 5/5] Restrict eth-account version < 0.11.0 due to maintainers introducing breaking pydantic requirements in 0.11.1 and 0.12.1 that did not exist in 0.11.0 and 0.12.0 respectively --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0bd0838..f21f7ece 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ dependencies = [ "coincurve; python_version<\"3.11\"", "coincurve>=17.0.0; python_version>=\"3.11\"", "eth_abi>=4.0.0; python_version>=\"3.11\"", - "eth_account>=0.4.0,<0.12.0", + "eth_account>=0.4.0,<0.11.0", "python-magic", "typer", "typing_extensions",