-
-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use external package builder with --installpkg #2442
Comments
hey, I work with Mark on the snowflake-sqlalchemy project and love to share more details as I was debugging this issue:
I'm not very familiar with how |
Installing tox via GitHub actions suddenly stopped working (no changes between commits of the repo: first scheduled test ran fine, next scheduled test resulted in: ROOT: HandledError| .pkg_external is already defined as a virtualenv-cmd-builder, cannot be virtualenv-pep-517 too
Error: Process completed with exit code 254. |
@sgbaird PR to fix this is welcome 👍 |
@gaborbernat I'll see if I can figure out where the discrepancy is. Any suggestions on pinning the tox version so I can verify a release that is working? I get the following warning https://github.com/sparks-baird/self-driving-lab-demo/actions/runs/3667147647/jobs/6199430609 which @ssbarnea also mentioned #2409 (comment): Run pipx run tox --installpkg 'dist/self_driving_lab_demo-0.6.0.post1.dev87+g694e3a0-py3-none-any.whl' -- -rFEx --durations 10 --color yes
creating virtual environment...
installing tox...
ROOT: will run in automatically provisioned tox, host /opt/pipx/.cache/5d372be6c729ea1/bin/python is missing [requires (has)]: tox<4.0.0 (4.0.5) #2414 is also mentioned, though obviously the warning is still cropping up. |
This is likely a version 4 bug, any version 3 should work. Note version 4 is a ground up rewrite so you can't really compare the difference between the two versions. |
@gaborbernat ah gotcha, I was thinking it had worked in EDIT: found a temporary workaround using |
I've also encountered this issue. I noticed in one of the backlinked PRs @freakboy3742 suggests that a workaround could be |
In that issue, @freakboy3742 claims that the incompatibility is related to using the |
This is intended as a workaround for the tox bug described at tox-dev/tox#2442.
FWIW: my investigation didn't suggest it was exclusively about extras; it's about having multiple targets in a toxfile, with 2 different install schemes. I'm using Adding |
@freakboy3742 thanks for the clarification! 👉 CURRENT WORKAROUND FOR PEOPLE COMING FROM GOOGLE 👈I have verified that setting |
This is a smoke test for when something changes wrt tox-dev/tox#2442.
If you have CI running on Windows, you may need to get rid of the emoji in the above workaround. On Azure pipelines, all my jobs started failing, with a warning message saying:
This is because file I/O has the unfortunate default of using a platform-dependent encoding, so it doesn't read files as UTF-8 by default on Windows. Then, because unicode errors subclass from ValueError, the exception is swallowed by this code which is meant to catch missing files. It took me a while to realise this, even though I'm quite familiar with encoding errors, so I hope this saves someone else some time. |
I was facing tracebacks in my case :) Ended up using |
This patch adds a workaround for a failure that happens in tox when `skip_install` is set and `--installpkg` is used. Ref: tox-dev/tox#2442
Does it really need to check twice if it has external_pkg. In --- a/src/tox/tox_env/runner.py
+++ b/src/tox/tox_env/runner.py
@@ -87,9 +87,8 @@ class RunToxEnv(ToxEnv, ABC):
self._call_pkg_envs("interrupt")
def get_package_env_types(self) -> tuple[str, str] | None:
- has_external_pkg = getattr(self.options, "install_pkg", None) is not None
- if self._register_package_conf() or has_external_pkg:
- has_external_pkg = has_external_pkg or self.conf["package"] == "external"
+ if self._register_package_conf():
+ has_external_pkg = self.conf["package"] == "external"
self.core.add_config(
keys=["package_env", "isolated_build_env"],
of_type=str, |
I don't think 🤔 it does to check twice. |
Hey,
When using
tox==4.0.0b2
with one of our projects that has an external package env it appears as we cannot supply a wheel file through--installpkg
if we have already built one.You can repro the issue with the following commands:
Thanks for the help!
The text was updated successfully, but these errors were encountered: