Skip to content

Commit

Permalink
Cargo.toml: make python optional but default.
Browse files Browse the repository at this point in the history
Python support provided by pyo3 requires linking against python >= 3.6.
Building retis on distros with older python versions would fail. In
order to work around this issues, make python an optional dependency but
enable it by default.

On non-supported distros, CARGO_CMD_OPTS="--no-default-features" can be
used to build without python support.

Signed-off-by: Adrian Moreno <[email protected]>
  • Loading branch information
amorenoz committed Oct 21, 2024
1 parent 9db8a08 commit 3564409
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 96 deletions.
3 changes: 2 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ functional_task:
env:
DISTRO: x86_64-c8s
TEST_EXTRA_ARGS: "--ignore=test_ovs.py --ignore=test_nft.py"
CARGO_CMD_OPTS: "--no-default-features"
- name: Centos 9 Stream (x86_64)
env:
DISTRO: x86_64-c9s
Expand Down Expand Up @@ -151,7 +152,7 @@ functional_task:
- ssh ${DISTRO} 'sh -exc "uname -a"'

test_script: &functional_test
- ssh -tt ${DISTRO} 'bash --login -exc "cd /vagrant && make V=1"'
- ssh -tt ${DISTRO} "env CARGO_CMD_OPTS=$CARGO_CMD_OPTS bash --login -exc 'cd /vagrant && make V=1'"
- ssh -tt ${DISTRO} "cd /vagrant/tests && sudo python3 -m pytest ${TEST_EXTRA_ARGS}"

# Manual trigger for non-PR branches.
Expand Down
Loading

0 comments on commit 3564409

Please sign in to comment.