Skip to content

Commit 7eb5595

Browse files
Use PIP_CONSTRAINT to fix 20.04 build
1 parent df82505 commit 7eb5595

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
build:
5757
name: Build charm
5858
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v31.0.1
59+
with:
60+
cache: false
5961

6062
integration-test:
6163
name: Integration test charm

charmcraft.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ parts:
5353
after:
5454
- poetry-deps
5555
poetry-export-extra-args: ['--only', 'main,charm-libs']
56+
build-environment:
57+
- PIP_CONSTRAINT: constraints.txt # Workaround for 20.04
5658
build-packages:
5759
- libffi-dev # Needed to build Python dependencies with Rust from source
5860
- libssl-dev # Needed to build Python dependencies with Rust from source
@@ -97,5 +99,6 @@ parts:
9799
stage:
98100
- LICENSE
99101
- charm_version
102+
- constraints.txt # Include in *.charm artifact for easier debugging
100103
- workload_version
101104
- templates

constraints.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
setuptools_scm < 8.2.0; python_version <= "3.8"
2+
# 1.8.4 maturin setup.py uses RustBin with env arg, which requires setuptools-rust >= 1.11.0, which
3+
# does not support python 3.8
4+
maturin < 1.8.4; python_version <= "3.8"
5+
setuptools-rust < 1.11; python_version <= "3.8"

0 commit comments

Comments
 (0)