Skip to content
Verified Commit 7a03baa2 authored by Matthew Clarkson's avatar Matthew Clarkson
Browse files

test: disable `pytest` tests on Windows

When `rules_python` performs a hermetic bootstrap, it creates a symlink from the unzipped
Python runfiles into the location of the Python interpreter[1].

However, on Windows, symlinks are only allowed if the user is in developer mode _or_ has
a security allowance for creating symlinks. The fallback would be to create a hardlink.

Neither of these solutions work because when the symlink/hardlink is executed Windows cannot
find the required DLLs to launch Python.

I attempted a hack where we hardlink in the DDLs and/or create junctions for the directories.
Nothing works well as eventually the runfiles for the target are not found.

This may be a missing piece of coverage on the upstream ruleset.

There is an effort to look into a native launcher[2] that may or may not fix things up.

For now, mark the `pytest` Python library incompatible with Windows.

Tracking the tech-debt in #8

[1]: https://github.com/bazelbuild/rules_python/blob/1.1.0/python/private/zip_main_template.py#L289
[2]: https://github.com/bazelbuild/rules_python/issues/2500
parent bc15c6a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment