Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Hashing for Caching Dependencies in Build Wheel GH Action #116

Merged
merged 5 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-

Expand All @@ -50,22 +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 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()"
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 2 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.11.0",
"python-magic",
"typer",
"typing_extensions",
Expand All @@ -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",
]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -111,7 +107,6 @@ python = ["3.8", "3.9", "3.10", "3.11"]
features = [
"cosmos",
"dns",
"ethereum",
"ledger",
"nuls2",
"polkadot",
Expand Down
Loading