diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 531b194..2598a70 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -78,17 +78,18 @@ jobs: components: rustfmt toolchain: 1.81.0 - - name: Setup env variables - shell: bash - run: | - UV_PYTHON_PATH=$(uv python dir) - export INSTALLED_PYTHON="$(find $UV_PYTHON_PATH -type d -maxdepth 1 -name '*${{ matrix.python }}*')" - echo "$INSTALLED_PYTHON" >> $GITHUB_PATH - echo "PYO3_PYTHON=$INSTALLED_PYTHON\python.exe" >> $GITHUB_ENV +# - name: Setup env variables +# shell: bash +# run: | +# UV_PYTHON_PATH=$(uv python dir) +# export INSTALLED_PYTHON="$(find $UV_PYTHON_PATH -type d -maxdepth 1 -name '*${{ matrix.python }}*')" +# echo "$INSTALLED_PYTHON" >> $GITHUB_PATH +# echo "PYO3_PYTHON=$INSTALLED_PYTHON\python.exe" >> $GITHUB_ENV - name: test run: | - make test INSTALL_EXTRA=test + . .venv/Scripts/activate && python -c "import rfc3161_client" + # make test INSTALL_EXTRA=test shell: bash env: OPENSSL_DIR: "C:\\OpenSSL-Win64" diff --git a/src/rfc3161_client/__init__.py b/src/rfc3161_client/__init__.py index 351db8b..3a76fff 100644 --- a/src/rfc3161_client/__init__.py +++ b/src/rfc3161_client/__init__.py @@ -1,4 +1,22 @@ """rfc3161-client""" +import os +import platform +import sys +from pathlib import Path + +def add_missing_dlls(): + print(f'ADD MISSING DIR {platform.system()}') + if platform.system() != "Windows": + return + + print(f"Adding directories to DLL directory") + if openssl_dir := os.environ.get("OPENSSL_DIR"): + os.add_dll_directory(openssl_dir) + + python_dir = Path(sys.executable).parent + os.add_dll_directory(python_dir.as_posix()) + +add_missing_dlls() from .base import TimestampRequestBuilder, decode_timestamp_response from .errors import VerificationError