We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075cc25 commit 743fd55Copy full SHA for 743fd55
src/pdm/backend/hooks/version/scm.py
@@ -46,6 +46,14 @@ def _subprocess_call(
46
if not k.startswith("GIT_")
47
or k in ("GIT_EXEC_PATH", "GIT_SSH", "GIT_SSH_COMMAND")
48
}
49
+ # adapted from setuptools-scm
50
+ # PYTHONPATH can break Python applications installed with Pipx, UV, etc.
51
+ if "PYTHONPATH" in env:
52
+ env["PYTHONPATH"] = os.pathsep.join(
53
+ path
54
+ for path in env["PYTHONPATH"].split(os.pathsep)
55
+ if "-build-env-" not in path
56
+ )
57
env.update({"LC_ALL": "C", "LANG": "", "HGPLAIN": "1"})
58
if extra_env:
59
env.update(extra_env)
0 commit comments