diff --git a/client/sources-linux/Makefile b/client/sources-linux/Makefile index 6e62f9ec..b8377ade 100644 --- a/client/sources-linux/Makefile +++ b/client/sources-linux/Makefile @@ -71,7 +71,7 @@ resources_library_compressed_string_txt.c: ../gen_resource_header.py resources/l resources/library_compressed_string.txt $(XZARGS) resources/bootloader.pyc: ../gen_python_bootloader.py ../../pupy/packages/all/pupyimporter.py ../../pupy/pp.py - $(PYTHON) $(PFLAGS) ../gen_python_bootloader.py $(DEBUG_ADD) + $(PYTHON) -OO $(PFLAGS) ../gen_python_bootloader.py $(DEBUG_ADD) resources_bootloader_pyc.c: ../gen_resource_header.py resources/bootloader.pyc $(PYTHON) $(PFLAGS) $+ $(XZARGS) @@ -101,7 +101,7 @@ resources/libssl.so: $(LIBSSL) rm -f $@.tmp resources/library.zip: ../build_library_zip.py ../additional_imports.py - $(PYTHON) $(PFLAGS) $< + $(PYTHON) -OO $(PFLAGS) $< resources_python27_so.c: ../gen_resource_header.py resources/python27.so $(PYTHON) $(PFLAGS) $+ $(XZARGS) diff --git a/client/sources-linux/buildenv.sh b/client/sources-linux/buildenv.sh index 4373f195..c1e3ecbb 100755 --- a/client/sources-linux/buildenv.sh +++ b/client/sources-linux/buildenv.sh @@ -275,13 +275,13 @@ cd /usr/src/automake-1.15 ./configure --prefix=/usr; make; make install CFLAGS="-O2 -pipe -DCLOCK_MONOTONIC=1 -UHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC -U_FILE_OFFSET_BITS" \ - python -O -m pip install pyuv --no-binary :all: + python -OO -m pip install pyuv --no-binary :all: -python -O -m pip uninstall -y cffi +python -OO -m pip uninstall -y cffi cd /usr/lib/python2.7 -python -O -m compileall -q python -m compileall -q +python -OO -m compileall -q find -name "*.so" | while read f; do strip \$f; done @@ -501,13 +501,13 @@ tar zxf automake-1.15.tar.gz cd /usr/src/automake-1.15 ./configure --prefix=/usr; make; make install -python -O -m pip install pyuv --no-binary :all: +python -OO -m pip install pyuv --no-binary :all: -python -O -m pip uninstall -y cffi +python -OO -m pip uninstall -y cffi cd /usr/lib/python2.7 -python -O -m compileall -q python -m compileall -q +python -OO -m compileall -q find -name "*.so" | while read f; do strip \$f; done @@ -535,7 +535,7 @@ TEMPLATES=`readlink -f ../../pupy/payload_templates` cd buildenv/lin64/usr/lib/python2.7 zip -y \ - -x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" -x "*.pyo" \ + -x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" -x "*.pyc" \ -x "*test/*" -x "*tests/*" -x "*examples/*" \ -x "*.egg-info/*" -x "*.dist-info/*" \ -x "idlelib/*" -x "lib-tk/*" -x "tk*" -x "tcl*" \ @@ -544,7 +544,7 @@ cd - cd buildenv/lin32/usr/lib/python2.7 zip -y \ - -x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" -x "*.pyo" \ + -x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" -x "*.pyc" \ -x "*test/*" -x "*tests/*" -x "*examples/*" \ -x "*.egg-info/*" -x "*.dist-info/*" \ -x "idlelib/*" -x "lib-tk/*" -x "tk*" -x "tcl*" -x "*.la" \ diff --git a/client/sources/Makefile b/client/sources/Makefile index 17d04513..84e1bea2 100644 --- a/client/sources/Makefile +++ b/client/sources/Makefile @@ -9,7 +9,7 @@ $(error You must specify an architecture - win64 or win32) endif CC := $(BUILDENV)/$(ARCH)/cl.sh -PYTHON := $(BUILDENV)/$(ARCH)/python.sh -O +PYTHON := $(BUILDENV)/$(ARCH)/python.sh HOST_PYTHON := python ifeq "$(ARCH)" "win64" diff --git a/client/sources/buildenv.sh b/client/sources/buildenv.sh index d57834da..581ec875 100755 --- a/client/sources/buildenv.sh +++ b/client/sources/buildenv.sh @@ -152,13 +152,13 @@ sed -i $WINEPREFIX/system.reg -e 's@"ProductName"="Microsoft Windows XP"@"Produc unset WINEPREFIX for prefix in $WINE32 $WINE64; do - WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade pip - WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade setuptools - WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade $PACKAGES - WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade --no-binary :all: psutil - WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip uninstall -y cffi - WINEPREFIX=$prefix wine C:\\Python27\\python -O -m compileall -q C:\\Python27\\Lib || true + WINEPREFIX=$prefix wine C:\\Python27\\python -OO -m pip install --upgrade pip + WINEPREFIX=$prefix wine C:\\Python27\\python -OO -m pip install --upgrade setuptools + WINEPREFIX=$prefix wine C:\\Python27\\python -OO -m pip install --upgrade $PACKAGES + WINEPREFIX=$prefix wine C:\\Python27\\python -OO -m pip install --upgrade --no-binary :all: psutil + WINEPREFIX=$prefix wine C:\\Python27\\python -OO -m pip uninstall -y cffi WINEPREFIX=$prefix wine C:\\Python27\\python -m compileall -q C:\\Python27\\Lib || true + WINEPREFIX=$prefix wine C:\\Python27\\python -OO -m compileall -q C:\\Python27\\Lib || true done # WINEPREFIX=$WINE32 wine C:\\Python27\\python.exe -m easy_install -Z $PYWIN32 @@ -168,7 +168,7 @@ cat >$WINE32/python.sh <$WINE64/python.sh <