Skip to content

Commit

Permalink
[Scons] Remove "install" target from "check_for_pytest"
Browse files Browse the repository at this point in the history
The `check_for_pytest` depends on `check_for_ruamel_yaml`
the pytest package is required on `install` phase and it results in
the Cantera installation fail if pytest absent
even if tests were not required.

This patch swap `check_for_pytest` and `check_for_ruamel_yaml`
dependency order.

The explicit `test-python-convert`, `test-python` targets are dropped
from `check_for_ruamel_yaml` because the `check_for_pytest`
includes `target.startswith("test-python")`.

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
  • Loading branch information
band-a-prend authored and ischoegl committed Feb 11, 2023
1 parent 808023c commit 0ce1a1b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1697,17 +1697,17 @@ ruamel_min_version = parse_version('0.15.34')
# Minimum pytest version assumed based on Ubuntu 20.04
pytest_min_version = parse_version("4.6.9")

# Pytest is required only to test the Python module
check_for_pytest = any(
target.startswith("test-python") for target in COMMAND_LINE_TARGETS
)

# Check for the minimum ruamel.yaml version, 0.15.34, at install and test
# time. The check happens at install and test time because ruamel.yaml is
# only required to run the Python interface, not to build it.
check_for_ruamel_yaml = any(
check_for_ruamel_yaml = check_for_pytest or any(
target in COMMAND_LINE_TARGETS
for target in ["install", "test", "test-python-convert", "test-python"]
)

# Pytest is required only to test the Python module
check_for_pytest = check_for_ruamel_yaml or any(
target.startswith("test-python") for target in COMMAND_LINE_TARGETS
for target in ["install", "test"]
)

if env['python_package'] == 'y':
Expand Down

0 comments on commit 0ce1a1b

Please sign in to comment.