Skip to content

Commit

Permalink
Try another option
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis <[email protected]>
  • Loading branch information
DarkaMaul committed Nov 4, 2024
1 parent efdc8f0 commit 70c57e1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,19 @@ 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
uv venv
. .venv/Scripts/activate && python -c "import rfc3161_client"
# make test INSTALL_EXTRA=test
shell: bash
env:
OPENSSL_DIR: "C:\\OpenSSL-Win64"
Expand Down
18 changes: 18 additions & 0 deletions src/rfc3161_client/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 70c57e1

Please sign in to comment.