classification
Title: Embeddable distribution pyc filenames show build machine location
Type: enhancement Stage: resolved
Components: Build, Installation, Windows Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Bill Collins, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2019-07-21 11:07 by Bill Collins, last changed 2019-08-17 21:12 by steve.dower. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14884 merged python-dev, 2019-07-21 17:45
PR 14953 merged miss-islington, 2019-07-25 21:37
Messages (3)
msg348235 - (view) Author: Bill Collins (Bill Collins) * Date: 2019-07-21 11:07
pyc files within the embeddable zip are compiled with their filename as the temporary directory in which they are compiled. Thus, stack traces will appear as (e.g.) D:\obj\windows-release\37win32_Release\msi_python\zip_win32\image.py, which is a little surprising and not obvious that it's actually from email/mime/image.py.

We currently work around this by updating the pyc files before shipping to be relative paths to Lib/; however, fixing this upstream would appear to be as simple as passing through the dest from _write_to_zip to _py_temp_compile (https://github.com/python/cpython/blob/21a92f8cda525d25a165b773fbe1bfffd303a000/PC/layout/main.py#L302) to be passed into _compile_one_py
msg348455 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-07-25 21:37
New changeset c4cda4369f4b8f33082890d16dfc364a90658ef6 by Steve Dower (Bill Collins) in branch 'master':
bpo-37641 preserve relative file location in embeddable zip (GH-14884)
https://github.com/python/cpython/commit/c4cda4369f4b8f33082890d16dfc364a90658ef6
msg348456 - (view) Author: miss-islington (miss-islington) Date: 2019-07-25 21:55
New changeset 0f211979c29109dcffc3039a24a9d3ecdfd900c9 by Miss Islington (bot) in branch '3.8':
bpo-37641 preserve relative file location in embeddable zip (GH-14884)
https://github.com/python/cpython/commit/0f211979c29109dcffc3039a24a9d3ecdfd900c9
History
Date User Action Args
2019-08-17 21:12:05steve.dowersetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: - Python 3.5, Python 3.6, Python 3.7
2019-07-25 21:55:48miss-islingtonsetnosy: + miss-islington
messages: + msg348456
2019-07-25 21:37:16miss-islingtonsetpull_requests: + pull_request14722
2019-07-25 21:37:03steve.dowersetmessages: + msg348455
2019-07-21 17:45:47python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request14669
2019-07-21 11:07:21Bill Collinscreate