Skip to content

Commit 22e8068

Browse files
committed
Use different commandline option to support py3.8
1 parent 34a3dc0 commit 22e8068

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ RUN find . -name "*.dist-info" -type d | xargs rm -rf
2727

2828

2929
# Precompile all .pyc files and remove .py files. This speeds up load time.
30-
# Compile with optimization level 2 (-o 2) and PYTHONNODEBUGRANGES=1 to redtce
30+
# Compile with optimization level 2 (-OO) and PYTHONNODEBUGRANGES=1 to redtce
3131
# size of .pyc files.
3232
# See https://docs.python.org/3/tutorial/modules.html#compiled-python-files
3333
# https://docs.python.org/3.11/using/cmdline.html#cmdoption-O
3434
# https://docs.python.org/3/using/cmdline.html#envvar-PYTHONNODEBUGRANGES
35-
RUN PYTHONNODEBUGRANGES=1 python -m compileall -o 2 -b ./python/lib/$runtime/site-packages
35+
RUN PYTHONNODEBUGRANGES=1 python -OO -m compileall -b ./python/lib/$runtime/site-packages
3636
RUN find ./python/lib/$runtime/site-packages -name \*.py -delete
3737
RUN find ./python/lib/$runtime/site-packages -name __pycache__ -type d -exec rm -r {} \+
3838

0 commit comments

Comments
 (0)