From fb59d9627d91231e1fc9792c8149a8017fbaa56a Mon Sep 17 00:00:00 2001 From: Alexis Date: Mon, 4 Nov 2024 17:42:00 +0100 Subject: [PATCH] Another solution to not use the cache Signed-off-by: Alexis --- .github/workflows/tests.yml | 21 ++++++++++++--------- src/rfc3161_client/__init__.py | 2 ++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4249767..ffe7fc9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -78,21 +78,24 @@ 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: | - uv venv - . .venv/Scripts/activate && uv pip install -n -e '.[test]' && pytest --cov=rfc3161_client + $PYO3_PYTHON -m venv env-local + . env-local/Scripts/activate + pip install -e '.[test]' + pytest --cov=rfc3161_client # make test INSTALL_EXTRA=test shell: bash env: OPENSSL_DIR: "C:\\OpenSSL-Win64" OPENSSL_LIB_DIR: "C:\\OpenSSL-Win64\\lib\\VC\\x64\\MD" OPENSSL_NO_VENDOR: 1 + UV_NO_CACHE: true diff --git a/src/rfc3161_client/__init__.py b/src/rfc3161_client/__init__.py index 7d8bda0..1c56468 100644 --- a/src/rfc3161_client/__init__.py +++ b/src/rfc3161_client/__init__.py @@ -19,8 +19,10 @@ def add_missing_dlls(): if openssl_dir := os.environ.get("OPENSSL_DIR"): os.add_dll_directory(openssl_dir) + print(f"Dlls : {list(Path(openssl_dir).glob('*.dll'))}") python_dir = Path(sys.executable).parent + print(f"Dlls ({python_dir}) : {list(Path(python_dir).glob('*.dll'))}") os.add_dll_directory(python_dir.as_posix()) add_missing_dlls()