`freeze.py` doesn't work on Windows
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với Tools/freeze/README và Tools/freeze/freeze.py, sau đó tái hiện các lệnh Windows trong báo cáo bằng nmake. Kiểm tra cách thư mục đầu ra và các đường dẫn include của Windows được xử lý, bao gồm PC/pyconfig.h bị thiếu được nêu trong báo cáo. Công việc được xem là hoàn tất khi các hướng dẫn Windows hoặc phần triển khai của freeze tạo ra một bản build không có các lỗi về đường dẫn và header được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- build-system, documentation, operating-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100