File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1818
1919进入 Python 源码根目录,打开 ` PCbuild\pcbiuld.sln ` 解决方案,而后进行一些设置:
2020
21- 在左侧的解决方案目录的顶端,右键选择“属性”,以打开属性界面(如下图所示)
22- ![ ] ( vs2017-properties.png )
21+ 在左侧的解决方案目录的顶端,右键选择“属性”,以打开属性界面(如下图所示)。
22+
23+ <img src =" vs2017-properties.png " width = " 350 " height = " 500 " />
2324
2425由于我们只是研究 Python 的核心部分,可以选择不编译标准库和外部依赖,在“配置属性”->“配置”中仅勾选
2526python 和 pythoncore,然后点击“确定”(如下图所示)。
2627
2728此外,默认情况下的编译设置是 Debug、32 位,您也可以根据自己的需求调整成 Release 或 64 位。
28- ![ ] ( vs2017-configure.png )
29+
30+ <img src =" vs2017-configure.png " width = " 750 " height = " 500 " />
2931
3032在左侧的解决方案目录中选择 python,右键选择“生成”,以进行编译:
31- ![ ] ( vs2017-build.png )
33+
34+ <img src =" vs2017-build.png " width = " 450 " height = " 600 " />
3235
3336编译结束后,生成的文件存放在` PCbuild\win32 ` 目录下(如下图所示),打开` python_d ` 即可打开新生成的 Python 3.7 解释器。
34- ![ ] ( build-files.png )
37+
38+ <img src =" build-files.png " width = " 300 " height = " 250 " />
3539
3640
3741## 更多内容
You can’t perform that action at this time.
0 commit comments