New submission from Bill Collins <bilbocoll...@gmail.com>:

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

----------
components: Build, Installation, Windows
messages: 348235
nosy: Bill Collins, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Embeddable distribution pyc filenames show build machine location
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37641>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to