Skip to content

Conversation

vytas7
Copy link
Contributor

@vytas7 vytas7 commented Sep 3, 2025

Fixes #3600.

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text (see the newsfragment)
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

@vytas7
Copy link
Contributor Author

vytas7 commented Sep 3, 2025

I had no energy to write any tests either since the issue doesn't affect me, and there exists an easy workaround.

But if you could provide pointers how such a test could look like, I can try to hack together something...

@webknjaz
Copy link
Contributor

webknjaz commented Sep 4, 2025

But if you could provide pointers how such a test could look like, I can try to hack together something...

@vytas7 maybe just extend/copy

@pytest.mark.usefixtures("enable_pip_pypi_access")
def test_pyproject_installpkg_pep517_envs(tox_project: ToxProjectCreator, pkg_with_pdm_backend: Path) -> None:
# Regression test for #3512
tox_ini = """
[tox]
envlist = dummy1,dummy2
[testenv:dummy1]
commands =
python -c print(1)
[testenv:dummy2]
commands =
python -c print(42)
"""
sdist = pkg_with_pdm_backend / "dist" / "skeleton-0.1.1337.tar.gz"
proj = tox_project({"tox.ini": tox_ini}, base=pkg_with_pdm_backend)
result = proj.run("--installpkg", str(sdist))
result.assert_success()
/
def test_run_installpkg_targz(
tox_project: ToxProjectCreator,
pkg_with_sdist: Path,
enable_pip_pypi_access: str | None, # noqa: ARG001
) -> None:
project = tox_project({
"tox.ini": """
[tox]
envlist = base, flake8
[testenv]
package = sdist
[testenv:base]
[testenv:flake8]
"""
})
outcome = project.run(f"--installpkg={pkg_with_sdist}")
outcome.assert_success()
adding a lightweight dep?

@vytas7
Copy link
Contributor Author

vytas7 commented Sep 4, 2025

adding a lightweight dep?

Right, I hacked something together based on the existing examples. I needed to add a mirrored Devpi index to be able to fetch setuptools in the automatically provisioned environment, not sure if there is a better way.

@vytas7 vytas7 marked this pull request as ready for review September 4, 2025 15:00
@vytas7 vytas7 requested a review from gaborbernat as a code owner September 4, 2025 15:00
@gaborbernat gaborbernat enabled auto-merge (squash) September 4, 2025 15:07
@gaborbernat gaborbernat merged commit 7230088 into tox-dev:main Sep 4, 2025
54 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically provisioned Tox hangs on pyproject_api if --installpkg is used
3 participants