Set PYLZ4_EXPERIMENTAL for the tox package build
Starting with Tox 4.0 environment variables for test environments
are not passed to the tox package building environment. To work
around this issue we leverage the .pkg environment, which is used
for package builds.
@@ -34,6 +34,15 @@ extras = docs
commands =
make -C docs doctest html
+[testenv:.pkg]
+# This section is needed to pass PYLZ4_EXPERIMENTAL into the
+# environment used to build the lz4 package ahead of creating the tox
+# virtual environment. Ideally we would like to be able to set this
+# only for docs building, but at the moment (tox 4.0.18) tox does not
+# allow that. See: https://github.com/tox-dev/tox/issues/2784
+setenv =
+ PYLZ4_EXPERIMENTAL = 1
+
[testenv:experimental]
extras = tests
passenv = *
