Skip to content

Commit

Permalink
Merge pull request #3433 from citrus-it/pyc
Browse files Browse the repository at this point in the history
When compiling python modules, always force rebuild and timestamp mode
  • Loading branch information
hadfl authored Dec 23, 2023
2 parents e1f449c + 10240cf commit 9e31425
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build/python311/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ post_configure() {
restore_variable CC
}

post_install() {
python_compile \
-o0 -o1 -o2 \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data'
}

TESTSUITE_SED="
1,/Tests result:/ {
/Tests result:/p
Expand Down
8 changes: 7 additions & 1 deletion lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2877,7 +2877,13 @@ python_vendor_relocate() {

python_compile() {
logmsg "Compiling python modules"
logcmd $PYTHON -m compileall $DESTDIR
logcmd $PYTHON \
-m compileall \
-j0 \
-f \
--invalidation-mode timestamp \
"$@" \
$DESTDIR
}

python_pep518() {
Expand Down

0 comments on commit 9e31425

Please sign in to comment.