Skip to content

Commit bc53a30

Browse files
committed
windows: install pdb files in install layout
The install script supports installing pdb files. Let's use its layout, since this is more standard.
1 parent ea4b3e6 commit bc53a30

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

cpython-windows/build.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,6 @@ def collect_python_build_artifacts(
12341234
# Things we want to collect:
12351235
# 1. object files that contribute to libpython
12361236
# 2. libraries for dependencies
1237-
# 3. pdb files for static libraries
12381237

12391238
# The build throws everything in the same directory hierarchy, so we can't
12401239
# easily filter by path to identify e.g. core versus extensions. We rely on
@@ -1298,10 +1297,6 @@ def process_project(project: pathlib.Path, dest_dir: pathlib.Path):
12981297
shutil.copyfile(p, dest)
12991298
yield f
13001299

1301-
elif p.suffix == ".pdb":
1302-
log("copying pdb file: %s to %s" % (p, dest_dir))
1303-
shutil.copyfile(p, dest)
1304-
13051300
def find_additional_dependencies(project: pathlib.Path):
13061301
vcproj = pcbuild_path / ("%s.vcxproj" % project)
13071302

@@ -1329,7 +1324,7 @@ def find_additional_dependencies(project: pathlib.Path):
13291324
if static:
13301325
exts = ("lib",)
13311326
else:
1332-
exts = ("lib", "pdb", "exp")
1327+
exts = ("lib", "exp")
13331328

13341329
for ext in exts:
13351330
source = outputs_path / ("python37.%s" % ext)
@@ -1464,15 +1459,6 @@ def find_additional_dependencies(project: pathlib.Path):
14641459
log("copying shared library %s" % shared_source)
14651460
shutil.copyfile(shared_source, shared_dest)
14661461

1467-
pdb_path = intermediates_path / depend / ("%s.pdb" % depend)
1468-
if not pdb_path.exists():
1469-
log("%s does not exist; trying alternate path" % pdb_path)
1470-
pdb_path = outputs_path / ("%s.pdb" % depend)
1471-
1472-
dest = lib_dir / ("%s.pdb" % depend)
1473-
log("copying pdb %s" % pdb_path)
1474-
shutil.copyfile(pdb_path, dest)
1475-
14761462
return res
14771463

14781464

@@ -1678,6 +1664,7 @@ def build_cpython(arch: str, pgo=False, build_mode="static"):
16781664
str(layout_tmp),
16791665
"--include-dev",
16801666
"--include-distutils",
1667+
"--include-symbols",
16811668
"--include-tests",
16821669
"--include-venv",
16831670
]

0 commit comments

Comments
 (0)