Skip to content

Commit

Permalink
Drop support for SCons 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Dec 27, 2024
1 parent 98dd3ce commit 5084cab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: |
python3 -m pip install ruamel.yaml scons==3.1.2
python3 -m pip install ruamel.yaml scons==4.0.1
- name: Build Cantera
run: |
python3 `which scons` build env_vars=all -j4 debug=n --debug=time \
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: |
python3 -m pip install ruamel.yaml scons==3.1.2 numpy${{ matrix.numpy }} \
python3 -m pip install ruamel.yaml scons==4.0.1 numpy${{ matrix.numpy }} \
cython${{ matrix.cython }} pandas pytest \
pytest-github-actions-annotate-failures pytest-xdist pint graphviz
- name: Build Cantera
Expand Down
14 changes: 1 addition & 13 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ Additional command options:
# screen instead of doing <command>, for example
# 'scons build dump'. For debugging purposes.

# This f-string is deliberately here to trigger a SyntaxError when
# SConstruct is parsed by Python 2. This seems to be the most robust
# and simplest option that will reliably trigger an error in Python 2
# and provide actionable feedback for users.
f"""
Cantera must be built using Python 3.10 or higher. You can invoke SCons by executing
python3 `which scons`
followed by any desired options.
"""

from pathlib import Path
import sys
import os
Expand All @@ -100,7 +90,7 @@ from buildutils import (Option, PathOption, BoolOption, EnumOption, Configuratio

# ensure that Python and SCons versions are sufficient for the build process
EnsurePythonVersion(3, 7)
EnsureSConsVersion(3, 0, 0)
EnsureSConsVersion(4, 0, 0)

if not COMMAND_LINE_TARGETS:
# Print usage help
Expand Down Expand Up @@ -844,8 +834,6 @@ if os.name == "nt":
elif windows_compiler_env["toolchain"] == "mingw":
toolchain = ["mingw", "f90"]
extraEnvArgs["F77"] = None
# Next line fixes https://github.com/SCons/scons/issues/2683
extraEnvArgs["WINDOWS_INSERT_DEF"] = 1

elif windows_compiler_env["toolchain"] == "intel":
toolchain = ["intelc"] # note: untested
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/develop/compiling/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ compiler is required only if you plan to build the Fortran module.
- SCons:

- <http://scons.org/tag/releases.html>
- Works with versions >= 3.0.0
- Works with versions >= 4.0.0
- On Windows, more recent SCons versions are required to support each new version of
the MSVC compiler.

Expand Down

0 comments on commit 5084cab

Please sign in to comment.