Skip to content

Commit 86ca5e5

Browse files
Document quick compile check steps
1 parent b112dba commit 86ca5e5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Python/compile.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ compiler_setup(compiler *c, mod_ty mod, PyObject *filename,
137137
c->c_optimize = (optimize == -1) ? _Py_GetConfig()->optimization_level : optimize;
138138
c->c_save_nested_seqs = false;
139139

140-
if (!_PyAST_Preprocess(mod, arena, filename, c->c_optimize, merged, 0)) {
140+
if (!_PyAST_Preprocess(mod, arena, filename,
141+
c->c_optimize, merged, 0, 1)) {
141142
return ERROR;
142143
}
143144
c->c_st = _PySymtable_Build(mod, filename, &c->c_future);
@@ -1518,7 +1519,8 @@ _PyCompile_AstPreprocess(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
15181519
if (optimize == -1) {
15191520
optimize = _Py_GetConfig()->optimization_level;
15201521
}
1521-
if (!_PyAST_Preprocess(mod, arena, filename, optimize, flags, no_const_folding)) {
1522+
if (!_PyAST_Preprocess(mod, arena, filename,
1523+
optimize, flags, no_const_folding, 1)) {
15221524
return -1;
15231525
}
15241526
return 0;

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ On Unix, Linux, BSD, macOS, and Cygwin::
5757

5858
This will install Python as ``python3``.
5959

60+
Quickly checking that a source change still compiles requires only the first
61+
two steps above: run ``./configure`` once (or reuse a previous build directory),
62+
then run ``make -j`` from the top level to rebuild the changed files. If you
63+
want to be sure no stale artifacts interfere, run ``make clean`` before the
64+
``make`` step.
65+
6066
You can pass many options to the configure script; run ``./configure --help``
6167
to find out more. On macOS case-insensitive file systems and on Cygwin,
6268
the executable is called ``python.exe``; elsewhere it's just ``python``.

0 commit comments

Comments
 (0)