Commit 5d39ea22 authored by kernc's avatar kernc

Merge pull request #1135 from ales-erjavec/win-install-update-pip

Windows installer: update pip on target system if required
parents acf95a9b 1fb39883
......@@ -7,7 +7,8 @@ function print_usage {
echo 'build-win-application.sh
Build an Windows applicaiton installer for Orange Canvas
Note: needs makensis and 7z on PATH
Note: needs makensis and 7z on PATH, as well as a python environment with
installed pip (>=7)
Options:
......@@ -64,6 +65,11 @@ PYTHON_VER_SHORT=${PYTHON_VER%.[0-9]*}
PYVER=$(echo $PYTHON_VER_SHORT | sed s/\\.//g)
PYTHON_MSI=python-$PYTHON_VER.msi
# The minimum pip version required (this is the version which was shipped
# with Python 3.4.3 (ensurepip)
PIP_VER=6.0.8
PIP_MD5=41e73fae2c86ba2270ff51c1d86f7e09
PYQT_VER=4.11.4
PYQT_MD5=b4164a0f97780fbb7c5c1e265dd37473
......@@ -126,7 +132,7 @@ function md5sum_check {
local checksum=${2:?}
local md5=
if [[ -x $(which md5 &> /dev/null) ]]; then
if which md5 &> /dev/null; then
md5=$(md5 -q "$filepath")
else
md5=$(md5sum "$filepath" | cut -d " " -f 1)
......@@ -191,6 +197,18 @@ function prepare_msvcr100 {
}
function prepare_pip {
local version=${PIP_VER:?}
local url=https://pypi.python.org/packages/py2.py3/p/pip/pip-${version}-py2.py3-none-any.whl
local md5=${PIP_MD5:?}
download_url "${url}" \
"${DOWNLOADDIR}"/pip-${version}-py2.py3-none-any.whl \
${md5}
cp "$DOWNLOADDIR"/pip-${version}-py2.py3-none-any.whl \
"$BUILDBASE"/wheelhouse/
}
function prepare_pyqt4 {
download_url \
https://dl.dropboxusercontent.com/u/100248799/PyQt4-${PYQT_VER}-cp34-none-win32.whl \
......@@ -321,6 +339,7 @@ function prepare_startupscripts {
function prepare_all {
prepare_python
prepare_msvcr100
prepare_pip
prepare_scipy_stack
prepare_pyqt4
# Need to specifically restrict the numpy/scipy versions, otherwise
......
......@@ -140,6 +140,10 @@ Section "Main"
${ExtractTemp} "${BASEDIR}\requirements.txt" ${TEMPDIR}\
# Update pip to minimum required version (pip>=6)
DetailPrint "Updating pip"
${PythonExec} '-m pip install --no-index -f "${TEMPDIR}\wheelhouse" -U pip'
DetailPrint "Installing scipy stack ($SSE)"
${Pip} 'install --no-deps --no-index \
-f "${TEMPDIR}\wheelhouse\$SSE" numpy scipy'
......
......@@ -96,6 +96,10 @@ Section ""
${ExtractTemp} "${BASEDIR}\requirements.txt" ${TEMPDIR}\
# Update pip to minimum required version (pip>=6)
DetailPrint "Updating pip"
${PythonExec} '-m pip install --no-index -f "${TEMPDIR}\wheelhouse" -U pip'
DetailPrint "Installing scipy stack ($SSE)"
${Pip} 'install --no-deps --no-index \
-f "${TEMPDIR}\wheelhouse\$SSE" numpy scipy'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment