Skip to content

Commit

Permalink
Merge pull request #3436 from citrus-it/pyc
Browse files Browse the repository at this point in the history
Fix python module compilation with Python 2.7
  • Loading branch information
hadfl authored Dec 23, 2023
2 parents 9e31425 + 0cf4158 commit f56c3e2
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2877,13 +2877,20 @@ python_vendor_relocate() {

python_compile() {
logmsg "Compiling python modules"
logcmd $PYTHON \
-m compileall \
-j0 \
-f \
--invalidation-mode timestamp \
"$@" \
$DESTDIR
case $PYTHONVER in
2.*) logcmd $PYTHON \
-m compileall \
-f \
"$@" \
$DESTDIR ;;
*) logcmd $PYTHON \
-m compileall \
-j0 \
-f \
--invalidation-mode timestamp \
"$@" \
$DESTDIR ;;
esac
}

python_pep518() {
Expand Down

0 comments on commit f56c3e2

Please sign in to comment.