pep517 backend - Copy symlinks when copying source (#80690)

pull/80703/head
Matt Clay 2 years ago committed by GitHub
parent 23e2ca91c2
commit 54576cd794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
bugfixes:
- pep517 build backend - Copy symlinks when copying the source tree.
This avoids tracebacks in various scenarios, such as when a venv is present in the source tree.

@ -118,7 +118,7 @@ def build_sdist( # noqa: WPS210, WPS430
original_src_dir = Path.cwd().resolve() original_src_dir = Path.cwd().resolve()
with _run_in_temporary_directory() as tmp_dir: with _run_in_temporary_directory() as tmp_dir:
tmp_src_dir = Path(tmp_dir) / 'src' tmp_src_dir = Path(tmp_dir) / 'src'
copytree(original_src_dir, tmp_src_dir) copytree(original_src_dir, tmp_src_dir, symlinks=True)
os.chdir(tmp_src_dir) os.chdir(tmp_src_dir)
if build_manpages_requested: if build_manpages_requested:

Loading…
Cancel
Save