From f39065969c2a812791ca13da94ee2b10ac6f2b5f Mon Sep 17 00:00:00 2001 From: Jurgen Lentz Date: Wed, 9 Oct 2024 15:53:33 +0200 Subject: [PATCH] add lib to PATH --- .github/workflows/build-and-test.yaml | 2 +- amplpy/__init__.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 86c96a7..0dd0615 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -6,7 +6,7 @@ env: CIBW_ARCHS_LINUX: auto CIBW_ARCHS_MACOS: x86_64 universal2 CIBW_BEFORE_BUILD: pip install cython - CIBW_SKIP: pp* cp27-* cp36-* cp37-* cp38-* *_i686 *-win32 *musllinux* + CIBW_SKIP: pp* cp27-* *_i686 *-win32 *musllinux* CIBW_TEST_COMMAND: python -m amplpy.tests CIBW_TEST_REQUIRES: --index-url https://pypi.ampl.com --extra-index-url https://pypi.org/simple ampl_module_base ampl_module_highs pandas numpy diff --git a/amplpy/__init__.py b/amplpy/__init__.py index 9212581..4d87e59 100644 --- a/amplpy/__init__.py +++ b/amplpy/__init__.py @@ -2,6 +2,8 @@ import sys import os +sys.path.append(os.path.join(os.path.dirname(__file__), "amplpython", "cppinterface", "lib", "amd64")) + if hasattr(os, 'add_dll_directory'): os.add_dll_directory(os.path.join(os.path.dirname(__file__), "amplpython", "cppinterface", "lib", "amd64"))