diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 82bc33caf65..816f79c387c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,26 +108,22 @@ jobs: name: Checkout the repository with: submodules: recursive - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - name: Install Brew dependencies - run: brew install boost libomp + run: | + brew install boost libomp scons python@${{ matrix.python-version }} - name: Upgrade pip run: python3 -m pip install -U pip 'setuptools>=47.0.0,<48' wheel - name: Install Python dependencies - run: python3 -m pip install ruamel.yaml scons numpy cython h5py pandas pytest + run: python3 -m pip install ruamel.yaml numpy cython h5py pandas pytest pytest-github-actions-annotate-failures - name: Install typing_extensions for Python 3.7 if: matrix.python-version == '3.7' run: python3 -m pip install typing_extensions - name: Build Cantera - run: python3 `which scons` build env_vars=all -j3 debug=n --debug=time + run: scons build env_vars=all -j3 debug=n --debug=time - name: Test Cantera run: - python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time + scons test show_long_tests=yes verbose_tests=yes --debug=time # Coverage is its own job because macOS builds of the samples # use Homebrew gfortran which is not compatible for coverage diff --git a/site_scons/buildutils.py b/site_scons/buildutils.py index 7a981db158d..06eabdda671 100644 --- a/site_scons/buildutils.py +++ b/site_scons/buildutils.py @@ -1301,10 +1301,10 @@ def setup_python_env(env): env["site_packages"] = info["site_packages"] env["user_site_packages"] = info["user_site_packages"] if env["OS"] != "Windows": - env["py_libpath"] = info["LIBPL"] + env["py_libpath"] = [info["LIBPL"], info["LIBDIR"]] py_lib = "python" + info["py_version_short"] + info["abiflags"] else: - env["py_libpath"] = info["installed_base"] + "\\libs" + env["py_libpath"] = [info["installed_base"] + "\\libs"] py_lib = "python" + py_version_nodot env["py_libs"] = [py_lib] + [lib[2:] for lib in info.get("LIBS", "").split() if lib.startswith("-l")] diff --git a/src/SConscript b/src/SConscript index 36edf469ace..ce856f807cb 100644 --- a/src/SConscript +++ b/src/SConscript @@ -97,7 +97,7 @@ if env["python_package"] == "full": localenv.Append(LIBS=pyenv["py_libs"], LIBPATH=pyenv["py_libpath"]) env["cantera_libs"].extend(pyenv["py_libs"]) env.Append(LIBPATH=pyenv["py_libpath"]) - env["extra_lib_dirs"].append(pyenv["py_libpath"]) + env["extra_lib_dirs"].extend(pyenv["py_libpath"]) # build the Cantera static library lib = build(localenv.StaticLibrary('../lib/cantera', libraryTargets,