@@ -32,7 +32,7 @@ LIBFFI_COMMIT=f671fe3521fb2f383d9b74bd64254b1d3760a31e
32
32
all : $(INSTALL ) /lib/$(LIB )
33
33
34
34
35
- $(INSTALL ) /lib/$(LIB ) : $(BUILD ) /$(LIB ) remove_modules$(PYTHON_MODE ) .txt
35
+ $(INSTALL ) /lib/$(LIB ) : $(BUILD ) /$(LIB ) remove_modules$(PYODIDE_BUILD ) .txt
36
36
( \
37
37
cd $(BUILD ) ; \
38
38
sed -i -e ' s/libinstall:.*/libinstall:/' Makefile; \
@@ -46,7 +46,9 @@ $(INSTALL)/lib/$(LIB): $(BUILD)/$(LIB) remove_modules$(PYTHON_MODE).txt
46
46
mv ` cat pybuilddir.txt` /$(SYSCONFIG_NAME ) .py $(INSTALL ) /lib/python$(PYMAJOR ) .$(PYMINOR ) /
47
47
rmdir ` cat pybuilddir.txt`
48
48
rm pybuilddir.txt
49
- cd $(INSTALL ) /lib/python$(PYMAJOR ) .$(PYMINOR ) / && rm -rf ` cat $( ROOT) /remove_modules$( PYTHON_MODE) .txt`
49
+ cd $(INSTALL ) /lib/python$(PYMAJOR ) .$(PYMINOR ) / && rm -rf ` cat $( ROOT) /remove_modules$( PYODIDE_BUILD) .txt`
50
+ # try to run pyminify; If this fails, pyminify is not available. Check your Docker container version!
51
+ pyminify --version > /dev/null 2>&1
50
52
for py in ` find $( INSTALL) /lib/python$( PYMAJOR) .$( PYMINOR) -name " *.py" ` ; do echo " Minifying $$ {py}..." ; pyminify --remove-literal-statements $$ {py} > $$ {py}.min; mv $$ {py}.min $$ {py}; done
51
53
52
54
@@ -139,7 +141,7 @@ $(BUILD)/Makefile: $(BUILD)/.patched $(ZLIBBUILD)/.configured $(INSTALL)/lib/lib
139
141
LDFLAGS=" -static" \
140
142
OPT=" -fwrapv -Os -Wall" \
141
143
CFLAGS=" ${PYTHON_CFLAGS} " \
142
- CPPFLAGS=$(if $(PYTHON_MODE ) ,"-I$(ZLIBBUILD ) ","-I$(SQLITEBUILD ) -I$(BZIP2BUILD ) -I$(ZLIBBUILD ) ") \
144
+ CPPFLAGS=$(if $(PYODIDE_BUILD ) ,"-I$(ZLIBBUILD ) ","-I$(SQLITEBUILD ) -I$(BZIP2BUILD ) -I$(ZLIBBUILD ) ") \
143
145
--without-doc-strings \
144
146
--without-pymalloc \
145
147
--disable-shared \
@@ -152,8 +154,8 @@ $(BUILD)/Makefile: $(BUILD)/.patched $(ZLIBBUILD)/.configured $(INSTALL)/lib/lib
152
154
)
153
155
154
156
155
- $(BUILD ) /Modules/Setup.local : $(BUILD ) /Makefile Setup$(PYTHON_MODE ) .local
156
- cp Setup$(PYTHON_MODE ) .local $(BUILD ) /Modules/Setup.local
157
+ $(BUILD ) /Modules/Setup.local : $(BUILD ) /Makefile Setup$(PYODIDE_BUILD ) .local
158
+ cp Setup$(PYODIDE_BUILD ) .local $(BUILD ) /Modules/Setup.local
157
159
158
160
$(BUILD ) /$(LIB ) : $(BUILD ) /Makefile $(BUILD ) /pyconfig.h $(BUILD ) /Modules/Setup.local $(INSTALL ) /lib/libffi.a
159
161
cat pyconfig.undefs.h >> $(BUILD ) /pyconfig.h
0 commit comments