Skip to content

Commit 8a5af7f

Browse files
Merge pull request #304 from Chia-Network/EL-update-python
update python and maturin versions
2 parents 43a862f + 6290bd3 commit 8a5af7f

File tree

5 files changed

+20
-42
lines changed

5 files changed

+20
-42
lines changed

.github/workflows/build-arm64-wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
rustup default stable
3737
rustup target add aarch64-unknown-linux-musl
3838
rm -rf venv
39-
export PATH="${PATH}:/opt/python/cp39-cp39/bin/:/opt/python/cp38-cp38/bin/:/opt/python/cp37-cp37m/bin/"
39+
export PATH="${PATH}:/opt/python/cp10-cp10/bin/"
4040
- name: Build Python wheels
4141
run: |
42-
/opt/python/cp38-cp38/bin/python -m venv venv
42+
/opt/python/cp310-cp310/bin/python -m venv venv
4343
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi
4444
. ./activate
45-
pip install maturin==1.7.0
45+
pip install maturin==1.10.2
4646
CC=gcc maturin build --release --strip --manylinux 2_28
4747
- name: Upload artifacts
4848
uses: actions/upload-artifact@v6

.github/workflows/build-m1-wheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
python3 -m venv venv
6060
. ./venv/bin/activate
6161
export PATH=~/.cargo/bin:$PATH
62-
pip install maturin==1.7.0
62+
pip install maturin==1.10.2
6363
maturin build -i python --release --strip
6464
cargo test
6565

.github/workflows/build-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Install dependencies
5252
run: |
5353
python -m pip install --upgrade pip
54-
python -m pip install maturin==1.7.0
54+
python -m pip install maturin==1.10.2
5555
5656
- name: Build MacOs with maturin on Python ${{ matrix.python }}
5757
if: startsWith(matrix.os, 'macos')
@@ -63,7 +63,7 @@ jobs:
6363
- name: Build Linux in manylinux_2_28 with maturin on Python ${{ matrix.python }}
6464
if: startsWith(matrix.os, 'ubuntu')
6565
run: |
66-
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin:v1.8.3 build --release --strip --manylinux 2_28 --sdist
66+
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin:v1.10.2 build --release --strip --manylinux 2_28 --sdist
6767
# Refresh in case any ownerships changed.
6868
mv target target.docker && cp -r target.docker target
6969
# Ensure an empty .cargo-lock file exists.
@@ -164,7 +164,7 @@ jobs:
164164
# chia_puzzles_py/manage_clvm.py while being in ./chia_puzzles.
165165
cp support/install_deps.sh support/verify_compiler_version.sh chia_puzzles
166166
(cd chia_puzzles && python -m venv .venv && . .venv/bin/activate && pip install --upgrade pip && \
167-
python -m pip install maturin==1.7.0 && \
167+
python -m pip install maturin==1.10.2 && \
168168
cd .. && \
169169
pip install --no-index --find-links target/wheels/ chialisp && \
170170
cd chia_puzzles && \
@@ -412,7 +412,7 @@ jobs:
412412
- name: install maturin & pytest
413413
run: |
414414
source venv/bin/activate
415-
python -m pip install maturin==1.7.0
415+
python -m pip install maturin==1.10.2
416416
pip install pytest
417417
- name: Build maturin interface
418418
run: |

.github/workflows/extensive-tests.yml

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -41,43 +41,25 @@ jobs:
4141
with:
4242
python-version: 3.11
4343

44-
- name: Update pip
44+
- uses: chia-network/actions/create-venv@main
45+
id: create-venv
46+
47+
- uses: chia-network/actions/activate-venv@main
48+
with:
49+
directories: ${{ steps.create-venv.outputs.activate-venv-directories }}
50+
51+
- name: Update pip and dependencies
4552
run: |
46-
python -m pip install --upgrade pip
53+
python -m pip install --upgrade pip maturin==1.10.2
4754
4855
- name: Set up rust
4956
uses: actions-rs/toolchain@v1
5057
with:
5158
toolchain: stable
5259

53-
- name: Install dependencies
54-
run: |
55-
python -m pip install maturin==1.7.0
56-
5760
- name: Build Linux in manylinux_2_28 with maturin on Python ${{ matrix.python }}
5861
run: |
59-
podman run --rm=true \
60-
-v ${{ github.workspace }}:/ws:rw --workdir=/ws \
61-
ghcr.io/chia-network/build-images/centos-pypa-rust-x86_64 \
62-
bash -exc '\
63-
yum -y install libc6 openssl-devel && \
64-
source $HOME/.cargo/env && \
65-
rustup target add x86_64-unknown-linux-musl && \
66-
rm -rf venv && \
67-
PY_VERSION=${{ matrix.python }}
68-
PY_VERSION=${PY_VERSION/.} && \
69-
echo "Python version with dot removed is $PY_VERSION" && \
70-
if [ "$PY_VERSION" = "37" ]; \
71-
then export SCND_VERSION="${PY_VERSION}m"; \
72-
else export SCND_VERSION="$PY_VERSION"; fi && \
73-
echo "Exporting path /opt/python/cp$PY_VERSION-cp$SCND_VERSION/bin" && \
74-
export PATH=/opt/python/cp$PY_VERSION-cp$SCND_VERSION/bin/:$PATH && \
75-
/opt/python/cp38-cp38/bin/python -m venv venv && \
76-
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi && \
77-
. ./activate && \
78-
pip install --upgrade pip
79-
'
80-
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin:v1.8.3 build --release --strip --manylinux 2_28
62+
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin:v1.10.2 build --release --strip --manylinux 2_28
8163
# Refresh in case any ownerships changed.
8264
mv target target.docker && cp -r target.docker target
8365
# Ensure an empty .cargo-lock file exists.
@@ -86,23 +68,20 @@ jobs:
8668
- name: Install chialisp wheel
8769
if: ${{ !startsWith(matrix.os, 'windows') }}
8870
run: |
89-
. ./activate
9071
ls target/wheels/
9172
# this mess puts the name of the `.whl` file into `$WHEEL_PATH`
9273
# remove the dot, use the `glob` lib to grab the file from the directory
93-
export WHEEL_PATH=$(echo ${{ matrix.python }} | python -c 'DOTLESS=input().replace(".", ""); import glob; print(" ".join(filter(lambda x: "musl" not in x, glob.glob("target/wheels/chialisp-*-cp*-*.whl"))))' )
74+
export WHEEL_PATH=$(echo "3.10" | python -c 'DOTLESS=input().replace(".", ""); import glob; print(" ".join(filter(lambda x: "musl" not in x, glob.glob("target/wheels/chialisp-*-cp*-*.whl"))))' )
9475
echo ${WHEEL_PATH}
9576
pip install ${WHEEL_PATH}
9677
9778
- name: Install other wheels
9879
run: |
99-
. ./activate
10080
python -m pip install pytest
10181
python -m pip install blspy
10282
10383
- name: install clvm & clvm_tools
10484
run: |
105-
. ./activate
10685
git clone https://github.com/Chia-Network/clvm.git --branch=main --single-branch
10786
python -m pip install ./clvm
10887
@@ -119,7 +98,6 @@ jobs:
11998
12099
- name: Run game referee test
121100
run: |
122-
. ./activate
123101
cp support/test-game-referee.sh .
124102
sh test-game-referee.sh resources/tests/game-referee-in-cl23
125103
sh test-game-referee.sh resources/tests/game-referee-in-cl21

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ chia-bls = "0.32.0"
4040

4141
[dependencies.pyo3]
4242
version = "0.24.1"
43-
features = ["abi3-py39", "extension-module"]
43+
features = ["abi3-py310", "extension-module"]
4444
optional = true
4545

4646
[dev-dependencies]

0 commit comments

Comments
 (0)