mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-16 08:38:30 +00:00
Setup: Fix issue with Windows toolchain install (#2225)
This commit is contained in:
parent
65781f4606
commit
95b1741d44
2 changed files with 8 additions and 4 deletions
2
.github/workflows/build-and-test.yml
vendored
2
.github/workflows/build-and-test.yml
vendored
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up R
|
||||
uses: r-lib/actions/setup-r@v1
|
||||
uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
r-version: ${{ matrix.config.r }}
|
||||
- name: Install remotes
|
||||
|
|
|
|||
|
|
@ -59,12 +59,16 @@ def repackage_cmdstan():
|
|||
def maybe_install_cmdstan_toolchain():
|
||||
"""Install C++ compilers required to build stan models on Windows machines."""
|
||||
import cmdstanpy
|
||||
from cmdstanpy.install_cxx_toolchain import main as _install_cxx_toolchain
|
||||
|
||||
try:
|
||||
cmdstanpy.utils.cxx_toolchain_path()
|
||||
except Exception:
|
||||
_install_cxx_toolchain({"version": None, "dir": None, "verbose": True})
|
||||
try:
|
||||
from cmdstanpy.install_cxx_toolchain import run_rtools_install
|
||||
except ImportError:
|
||||
# older versions
|
||||
from cmdstanpy.install_cxx_toolchain import main as run_rtools_install
|
||||
|
||||
run_rtools_install({"version": None, "dir": None, "verbose": True})
|
||||
cmdstanpy.utils.cxx_toolchain_path()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue