Closed WardBrian closed 1 year ago
It turns out that whether the os.add_dll_directory call is necessary is OS (windows only), version (behaves differently in 3.8 and 3.10), AND distribution (anaconda python doesn’t need it, python from python.org does) specific.
I have confirmed that it never hurts in situations where it isn’t required, but that explains why I could never get the tests to run in CI but could locally.
This is in response to #117. It isn't a full "fix" (arbitrary user configs could still run into similar problems and need to set their own
%PATH%
s correctly), but it attempts to be a bit friendlier.This is similar to code in cmdstanpy. The main difference is (in Python) it also uses
os.add_dll_directory
. This appears to have fixed the issue which was preventing us from running our Python tests on Windows in Github Actions, so I've re-enabled those.I'll do a follow on PR which tries to split the Windows CI in to separate jobs per-interface.
Note: This PR does not change the R interface, since R doesn't (yet) have any handling of where BridgeStan is installed (see #100)