`freeze.py` doesn't work on Windows
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug report
Bug description:
I tried to run freeze.py under the README instructions here.
# Assumed I was in the Python source tree root
python .\Tools\freeze\freeze.py -p . -o hello .\PCbuild\amd64\tests\hello.py
It did generate lots of .c source files. But when I ran nmake to generate the target, it complained as follows
Microsoft (R) Program Maintenance Utility Version 14.43.34809.0
Copyright (C) Microsoft Corporation. All rights reserved.
if not exist Build\Release\. mkdir Build\Release
NMAKE : fatal error U1073: don't know how to make '".\Python\frozenmain.c"'
Stop.
It looks like it could not find the correct Python path. Then I tried ran the command without the output directory option
python .\Tools\freeze\freeze.py -p . .\PCbuild\amd64\tests\hello.py
And ran nmake. It complained as follows
Microsoft (R) Program Maintenance Utility Version 14.43.34809.0
Copyright (C) Microsoft Corporation. All rights reserved.
frozenmain.c
./Include\Python.h(14): fatal error C1083: Cannot open include file: 'pyconfig.h': No such file or directory
NMAKE : fatal error U1077: 'cl -c -nologo /FoBuild\Release\frozenmain /MD /Ox /D BUILD_FREEZE "-I./Include" "-I./PC" ".\Python\frozenmain.c"' : return code '0x2'
Stop.
I found the PC\pyconfig.h was removed since Python3.13. Should we update the document?
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da Tools/freeze/README e Tools/freeze/freeze.py, quindi riproduci con nmake i comandi Windows riportati nel report. Verifica come vengono gestiti la directory di output e i percorsi di inclusione di Windows, inclusa l’assenza di PC/pyconfig.h indicata nel report. Il lavoro è completato quando le istruzioni Windows o l’implementazione di freeze producono una build senza gli errori relativi ai percorsi e agli header riportati nel report.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- build-system, documentation, operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100