Skip to content

Commit

Permalink
fix: install in venv
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming committed Dec 2, 2024
1 parent a5e3c17 commit 8b9422d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pdm/models/in_process/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def parse_setup_py(executable: str, path: str) -> dict[str, Any]:
"""Parse setup.py and return the kwargs"""
with _in_process_script("parse_setup.py") as script:
_, outfile = tempfile.mkstemp(suffix=".json")
cmd = [executable, "-Es", script, path, outfile]
cmd = [executable, script, path, outfile]
subprocess.check_call(cmd)
with open(outfile, "rb") as fp:
return json.load(fp)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ def test_export_replace_project_root(project):

@pytest.mark.usefixtures("local_finder")
def test_convert_setup_py_project(project, pdm):
golden_file = FIXTURES / "projects/test-setuptools/setup.py"
project._saved_python = None
project.project_config["python.use_venv"] = True
pdm(["add", "setuptools"], obj=project)
golden_file = FIXTURES / "projects/test-setuptools/setup.py"
assert setup_py.check_fingerprint(project, golden_file)
result, settings = setup_py.convert(project, golden_file, ns())
assert result == {
Expand Down

0 comments on commit 8b9422d

Please sign in to comment.