This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Windows build doesn't regenerate some files
Type: Stage: resolved
Components: Windows Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: gvanrossum, kj, miss-islington, neonene, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2021-06-21 23:02 by gvanrossum, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26984 merged steve.dower, 2021-07-01 21:10
PR 27034 closed miss-islington, 2021-07-05 15:19
PR 27035 merged steve.dower, 2021-07-05 15:40
PR 27056 merged steve.dower, 2021-07-07 16:45
PR 27058 merged steve.dower, 2021-07-07 17:26
PR 27146 closed neonene, 2021-07-14 20:17
PR 27460 merged steve.dower, 2021-07-29 19:24
PR 27462 merged steve.dower, 2021-07-29 20:01
Messages (13)
msg396299 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-06-21 23:04
The new PCbuild\build.bat script is much better at regenerating necessary files. However I just found out that there are some more files that need to be regenerated occasionally:

- Programs/test_frozenmain.h
- Python/frozen_hello.h

Could you add rules for these?
msg396994 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-05 15:18
New changeset 1b133ab8412e4f6a53914212df7a7656f376256d by Steve Dower in branch 'main':
bpo-44479: Regenerate test_frozenmain.h and frozen_hello.h during build on Windows (GH-26984)
https://github.com/python/cpython/commit/1b133ab8412e4f6a53914212df7a7656f376256d
msg396997 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-07-05 15:43
Thanks, I tried this and it works beautifully!
msg397005 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-05 16:28
New changeset f3289a50503ed1a809d77fb03744bdcc7b9f1093 by Steve Dower in branch '3.10':
bpo-44479: Regenerate test_frozenmain.h and frozen_hello.h during build on Windows (GH-26984)
https://github.com/python/cpython/commit/f3289a50503ed1a809d77fb03744bdcc7b9f1093
msg397006 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-05 16:28
Great! I backported to 3.10, but we never took the other changes back to 3.9 so it can stop there.
msg397102 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-07-07 15:43
@Steve, after this change, the Azure Pipelines commit CI's appx tests started failing on main and 3.10.

https://dev.azure.com/Python/cpython/_build/results?buildId=83619&view=results

======================================================================
FAIL: test_printer_buttons (idlelib.idle_test.test_help_about.LiveDialogTest) (name='license')
Test buttons whose commands use printer function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\1\b\layout-appx-win32\lib\idlelib\idle_test\test_help_about.py", line 65, in test_printer_buttons
    self.fail(name + ' full text was not found')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: license full text was not found

It seems that idlelib's license isn't included in that specific build.

FWIW, I can't repro this on my own machine. Though I recall you explaining that appx has some differences in another issue.

Please take a look if you have the time. Thanks in advance!
msg397104 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-07 16:45
Didn't even realise we had a test for it. Maybe it only runs in install-like layouts?

I'll simplify the regeneration by just doing it every time. Nothing else depends on the license file, so it won't matter if we touch it unnecessarily.
msg397105 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-07 17:22
New changeset 3d3027c5fcc683c14ee55ad231d79971ba12b24d by Steve Dower in branch 'main':
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
https://github.com/python/cpython/commit/3d3027c5fcc683c14ee55ad231d79971ba12b24d
msg397107 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-07 18:35
New changeset f2491c647937fc0871a473c19e3d5cb5392cfca0 by Steve Dower in branch '3.10':
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
https://github.com/python/cpython/commit/f2491c647937fc0871a473c19e3d5cb5392cfca0
msg397506 - (view) Author: neonene (neonene) * Date: 2021-07-14 20:18
When building, some pull-requests invoke regeneration of test_frozenmain.h.
On PGO mode, MSVC tries to call instrumented python and stops with "pgort140.dll not found" error.
Would it be OK to run python in externals folder instead ?
msg398333 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-28 00:20
> Would it be OK to run python in externals folder instead ?

No, because it needs to freeze with the current build. However, we should definitely not regenerate anything when "$(Configuration) == 'PGUpdate'". Checking that in regen.targets should prevent the issue.
msg398514 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-29 19:53
New changeset 3edec5d142365f2340865b4f12652e6aa627818a by Steve Dower in branch 'main':
bpo-44479: Do not regenerate files during a PGO build as it will invalidate the profile. (GH-27460)
https://github.com/python/cpython/commit/3edec5d142365f2340865b4f12652e6aa627818a
msg398521 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-07-29 22:18
New changeset 0b984d1cccc9547c2c16203e9ab2b2959fbabcde by Steve Dower in branch '3.10':
bpo-44479: Do not regenerate files during a PGO build as it will invalidate the profile. (GH-27462)
https://github.com/python/cpython/commit/0b984d1cccc9547c2c16203e9ab2b2959fbabcde
History
Date User Action Args
2022-04-11 14:59:47adminsetgithub: 88645
2021-07-29 22:19:01steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-07-29 22:18:36steve.dowersetmessages: + msg398521
2021-07-29 20:01:53steve.dowersetpull_requests: + pull_request25985
2021-07-29 19:53:32steve.dowersetmessages: + msg398514
2021-07-29 19:24:43steve.dowersetstage: resolved -> patch review
pull_requests: + pull_request25983
2021-07-28 00:20:48steve.dowersetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg398333
2021-07-14 20:18:50neonenesetmessages: + msg397506
2021-07-14 20:17:19neonenesetnosy: + neonene

pull_requests: + pull_request25688
2021-07-07 18:35:59steve.dowersetmessages: + msg397107
2021-07-07 17:26:42steve.dowersetpull_requests: + pull_request25613
2021-07-07 17:22:01steve.dowersetmessages: + msg397105
2021-07-07 16:45:36steve.dowersetpull_requests: + pull_request25612
2021-07-07 16:45:14steve.dowersetmessages: + msg397104
2021-07-07 15:43:06kjsetnosy: + kj
messages: + msg397102
2021-07-05 16:28:55steve.dowersetstatus: open -> closed
versions: + Python 3.10, Python 3.11
messages: + msg397006

assignee: steve.dower
resolution: fixed
stage: patch review -> resolved
2021-07-05 16:28:15steve.dowersetmessages: + msg397005
2021-07-05 15:43:31gvanrossumsetmessages: + msg396997
2021-07-05 15:40:12steve.dowersetpull_requests: + pull_request25595
2021-07-05 15:19:10miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request25594
2021-07-05 15:18:22steve.dowersetmessages: + msg396994
2021-07-01 21:10:29steve.dowersetkeywords: + patch
stage: patch review
pull_requests: + pull_request25546
2021-06-21 23:04:58gvanrossumsetmessages: + msg396299
2021-06-21 23:02:30gvanrossumcreate