Skip to content

Commit

Permalink
Merge pull request #24 from pdm-project/fix/multiple-execution-pyversion
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming authored Apr 25, 2022
2 parents 03ad8fd + 8f0e6e5 commit cc2ee41
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tox_pdm/plugin3.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def patched(self, cmd, *args, **kwargs):
return patched

VirtualEnv.getcommandpath = patch_getcommandpath(VirtualEnv.getcommandpath)

venv._pcall(
[venv.envconfig.config.option.pdm, "use", "-f", config_interpreter],
cwd=venv.path,
venv=False,
action=action,
)
if not venv.path.join(".pdm.toml").exists():
venv._pcall(
[venv.envconfig.config.option.pdm, "use", "-f", config_interpreter],
cwd=venv.path,
venv=False,
action=action,
)
return True


Expand Down Expand Up @@ -84,7 +84,6 @@ def acquire_package(config: config.Config, venv: VirtualEnv) -> py.path.local:
target_dir,
]
with venv.new_action("buildpkg") as action:
tox_testenv_create(venv, action)
venv._pcall(
args, cwd=venv.envconfig.config.toxinidir, venv=False, action=action
)
Expand All @@ -95,7 +94,8 @@ def acquire_package(config: config.Config, venv: VirtualEnv) -> py.path.local:

@hookimpl
def tox_package(session: session.Session, venv: VirtualEnv) -> Any:
clone_pdm_files(str(venv.path), str(venv.envconfig.config.toxinidir))
with venv.new_action("buildpkg") as action:
tox_testenv_create(venv, action)
if not detect_pdm_files(venv.path):
return
if not hasattr(session, "package"):
Expand Down

0 comments on commit cc2ee41

Please sign in to comment.