diff --git a/amplpy/__init__.py b/amplpy/__init__.py index 228064c..c8910b1 100644 --- a/amplpy/__init__.py +++ b/amplpy/__init__.py @@ -2,6 +2,9 @@ import sys import os +if hasattr(os, 'add_dll_directory'): + os.add_dll_directory(os.path.join(os.path.dirname(__file__), "amplpython", "cppinterface", "lib")) + from _amplpy import OutputHandler, Kind from _amplpy import ErrorHandler from _amplpy import AMPLException, PresolveException, InfeasibilityException diff --git a/amplpy/amplpython/__init__.py b/amplpy/amplpython/__init__.py index 5099ce6..f293fa3 100644 --- a/amplpy/amplpython/__init__.py +++ b/amplpy/amplpython/__init__.py @@ -4,9 +4,6 @@ import ctypes import platform -if hasattr(os, 'add_dll_directory'): - os.add_dll_directory(os.path.join(os.path.dirname(__file__), "cppinterface", "lib")) - if platform.system().startswith(("Windows", "MSYS", "CYGWIN", "MINGW")): libbase = os.path.join(os.path.dirname(__file__), "cppinterface", "lib") lib32 = os.path.join(libbase, "intel32")