diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e22ae09..12b38af 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -83,7 +83,7 @@ jobs: python -m build --wheel # As in python_bridge.yml: the single wheel for every platform, with sources of - # every kind, the manifest, the five DLLs, no other binary, and the version that + # every kind, the manifest, the six DLLs, no other binary, and the version that # is being released. - name: '馃攳 Check distribution content' run: | @@ -96,10 +96,10 @@ jobs: for file in $(git ls-files src/vunit_python_bridge | grep -E '/(native|hdl/src)/|\.py$|\.toml$' | sed 's#^src/##'); do grep -qx "$file" wheel.txt || { echo "missing $file in the wheel"; exit 1; } done - # The five DLLs and no other binary - dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-4]-win_amd64\.dll$' - test "$(grep -c "$dlls" wheel.txt)" = 5 - test "$(grep -c '\.dll$' wheel.txt)" = 5 + # The six DLLs and no other binary + dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-5]-win_amd64\.dll$' + test "$(grep -c "$dlls" wheel.txt)" = 6 + test "$(grep -c '\.dll$' wheel.txt)" = 6 if grep -qE '\.(so|dylib|pyd)$' wheel.txt; then echo "the wheel has a binary"; exit 1; fi test -f "dist/vunit_python_bridge-${{ needs.version.outputs.version }}-py3-none-any.whl" diff --git a/.github/workflows/python_bridge.yml b/.github/workflows/python_bridge.yml index 71ab003..406d98a 100644 --- a/.github/workflows/python_bridge.yml +++ b/.github/workflows/python_bridge.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - # The oldest and newest supported CPython; every GHDL backend, since + # The oldest and the two newest supported CPythons; every GHDL backend, since # the bridge library is loaded differently by the ones that link ahead # of time (llvm, gcc), on the latest release; the NVC release VUnit is # developed against. @@ -36,18 +36,24 @@ jobs: include: - { os: ubuntu-24.04, py: '3.10', sim: nvc, nvc: '1.22.1' } - { os: ubuntu-24.04, py: '3.14', sim: nvc, nvc: '1.22.1' } + - { os: ubuntu-24.04, py: '3.15', sim: nvc, nvc: '1.22.1' } - { os: ubuntu-24.04, py: '3.14', sim: nvc, nvc: master, canary: true } - { os: ubuntu-24.04, py: '3.10', sim: ghdl, backend: mcode, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: mcode, ghdl: nightly, canary: true } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm-jit, ghdl: latest } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl, backend: llvm-jit, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm-jit, ghdl: nightly, canary: true } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm, ghdl: latest } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl, backend: llvm, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm, ghdl: nightly, canary: true } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: gcc, ghdl: latest } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl, backend: gcc, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: gcc, ghdl: nightly, canary: true } - { os: macos-15, py: '3.14', sim: nvc, nvc: brew } + - { os: macos-15, py: '3.15', sim: nvc, nvc: brew } # macos-15: setup-ghdl has no build for newer macOS versions yet, and only the llvm backend - { os: macos-15, py: '3.14', sim: ghdl, backend: llvm, ghdl: latest } + - { os: macos-15, py: '3.15', sim: ghdl, backend: llvm, ghdl: latest } name: '${{ matrix.os }} 路 Python ${{ matrix.py }} 路 ${{ matrix.sim }} ${{ matrix.backend }}${{ matrix.ghdl }}${{ matrix.nvc }}' continue-on-error: ${{ matrix.canary || false }} env: @@ -120,7 +126,7 @@ jobs: strategy: fail-fast: false matrix: - py: ['3.10', '3.12', '3.14'] + py: ['3.10', '3.12', '3.14', '3.15'] sim: [nvc, ghdl] bridge: [dll] # No prebuilt DLLs: the library is built with the MinGW gcc of the runner image, the @@ -226,7 +232,7 @@ jobs: pip install -U build --progress-bar off python -m build --wheel - # The single wheel for every platform: sources of every kind, the manifest, the five + # The single wheel for every platform: sources of every kind, the manifest, the six # DLLs, no other binary - name: '馃攳 Check distribution content' run: | @@ -239,10 +245,10 @@ jobs: for file in $(git ls-files src/vunit_python_bridge | grep -E '/(native|hdl/src)/|\.py$|\.toml$' | sed 's#^src/##'); do grep -qx "$file" wheel.txt || { echo "missing $file in the wheel"; exit 1; } done - # The five DLLs and no other binary - dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-4]-win_amd64\.dll$' - test "$(grep -c "$dlls" wheel.txt)" = 5 - test "$(grep -c '\.dll$' wheel.txt)" = 5 + # The six DLLs and no other binary + dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-5]-win_amd64\.dll$' + test "$(grep -c "$dlls" wheel.txt)" = 6 + test "$(grep -c '\.dll$' wheel.txt)" = 6 if grep -qE '\.(so|dylib|pyd)$' wheel.txt; then echo "the wheel has a binary"; exit 1; fi - name: '馃摛 Upload the distribution' diff --git a/.github/workflows/python_bridge_dlls.yml b/.github/workflows/python_bridge_dlls.yml index b04da19..272ab33 100644 --- a/.github/workflows/python_bridge_dlls.yml +++ b/.github/workflows/python_bridge_dlls.yml @@ -12,7 +12,7 @@ jobs: runs-on: windows-latest strategy: matrix: - py: ['3.10', '3.11', '3.12', '3.13', '3.14'] + py: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15'] name: '馃煢 MSVC 路 bridge DLL 路 Python ${{ matrix.py }}' steps: @@ -54,7 +54,7 @@ jobs: path: dlls - name: '馃攳 Check DLLs' - run: test "$(ls dlls/*.dll | wc -l)" = 5 + run: test "$(ls dlls/*.dll | wc -l)" = 6 - name: '馃摛 Upload DLLs' uses: actions/upload-artifact@v4 diff --git a/.github/workflows/wheel_tests.yml b/.github/workflows/wheel_tests.yml index 7386801..307a391 100644 --- a/.github/workflows/wheel_tests.yml +++ b/.github/workflows/wheel_tests.yml @@ -35,13 +35,17 @@ jobs: include: - { os: ubuntu-24.04, py: '3.10', sim: nvc } - { os: ubuntu-24.04, py: '3.14', sim: ghdl } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl } - { os: macos-15, py: '3.14', sim: nvc } + - { os: macos-15, py: '3.15', sim: nvc } - { os: windows-latest, py: '3.10', sim: nvc } - { os: windows-latest, py: '3.11', sim: nvc } - { os: windows-latest, py: '3.12', sim: nvc } - { os: windows-latest, py: '3.13', sim: nvc } - { os: windows-latest, py: '3.14', sim: nvc } + - { os: windows-latest, py: '3.15', sim: nvc } - { os: windows-latest, py: '3.14', sim: ghdl } + - { os: windows-latest, py: '3.15', sim: ghdl } name: '馃帯 Wheel 路 ${{ matrix.os }} 路 Python ${{ matrix.py }} 路 ${{ matrix.sim }}' env: VUNIT_SIMULATOR: ${{ matrix.sim }} diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 2f17731..81d247f 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -1077,8 +1077,8 @@ GHDL gcc 6.0.0, 7.0.0-dev Questa (FLI) Altera Starter FPGA Edition 2025.3 ========================== ======================================================== -On Windows, CI tests NVC 1.22 and GHDL mcode (nightly) with Python 3.10, 3.12 -and 3.14. The released wheel is also installed and tested on Linux, macOS and on +On Windows, CI tests NVC 1.22 and GHDL mcode (nightly) with Python 3.10, 3.12, +3.14 and 3.15. The released wheel is also installed and tested on Linux, macOS and on Windows machines without a compiler, there with every supported Python, so each of its prebuilt DLLs is run. diff --git a/release_notes/0.2.0.md b/release_notes/0.2.0.md index cbbefbb..ab7fb01 100644 --- a/release_notes/0.2.0.md +++ b/release_notes/0.2.0.md @@ -2,5 +2,6 @@ - `import_module_from_file` resolves a relative path against the directory of the testbench file, like `exec_file`, rather than against the working directory of the simulator. It must be called after `test_runner_setup`. Callers that relied on a path relative to the working directory must pass an absolute path instead. See #7. - A relative file name given to `exec_file` or `import_module_from_file` before `test_runner_setup` has completed is reported as a failure, instead of being taken from the working directory of the simulator. The new `base_path` returns a base directory set with `vunit_python_bridge.set_relative_file_base()` or `VUNIT_PYTHON_BRIDGE_FILE_BASE`, for file names that work at any time, for example in verification components. +- Python 3.15 is supported, with a prebuilt bridge DLL for Windows. - The bridge library is no longer built in or copied to the VUnit output path, which may not allow executing files, but to `~/.vunit-python-bridge` in the home directory of the user, on every platform. This includes the prebuilt Windows DLLs. `VUNIT_PYTHON_BRIDGE_LIBRARY_DIR` selects another directory on every platform. When the directory cannot be written, the setup fails and asks for the variable to be set. - A library directory the simulator cannot load the bridge library from is reported as such when the package is set up: on Linux and macOS one on a file system mounted `noexec`, e.g. a tmpfs in a container, and on Windows one where an execution policy (AppLocker, Windows Defender Application Control) blocks the library. The simulator only reports that it failed to load it. Any other reason the library does not load is reported by the setup with the reason the system gives, rather than by NVC or GHDL as "cannot load VHPIDIRECT shared library" with no reason. diff --git a/tests/test_python_bridge.py b/tests/test_python_bridge.py index 86cfe66..31527d4 100644 --- a/tests/test_python_bridge.py +++ b/tests/test_python_bridge.py @@ -1059,7 +1059,7 @@ class TestWindowsDllSelection(unittest.TestCase): """ def test_windows_dll_name_for_supported_versions(self): - for minor in range(10, 15): + for minor in range(10, 16): with mock.patch("sys.version_info", (3, minor)): self.assertEqual(native_library.windows_dll_name(), f"vunit_python_bridge-cp3{minor}-win_amd64.dll")