From d89a715622bcfde8a82f27e391ad73ceea547038 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 27 Sep 2019 15:11:28 -0700 Subject: [PATCH] Build Update 1. Use the same docker image as the wolfSSL python project. 2. Remove the absolute path to the python interpreter. They just need to be in the path. (For example, you might install old versions in /opt and add their subdirs to the path while the latest runs out of its location.) 3. Build the name of python, pip, and venv_ based on the version. --- make/manylinux1/build_wheels.sh | 2 +- make/osx/build_wheels.sh | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/make/manylinux1/build_wheels.sh b/make/manylinux1/build_wheels.sh index f08d126..e836814 100755 --- a/make/manylinux1/build_wheels.sh +++ b/make/manylinux1/build_wheels.sh @@ -6,5 +6,5 @@ docker run \ --rm \ -v `pwd`:/wolfcrypt-py \ -w /wolfcrypt-py \ - quay.io/pypa/manylinux1_x86_64 \ + wolfssl/manylinux1-x86_64 \ bash -c "make/manylinux1/build.sh" diff --git a/make/osx/build_wheels.sh b/make/osx/build_wheels.sh index 212052a..46ec2ec 100755 --- a/make/osx/build_wheels.sh +++ b/make/osx/build_wheels.sh @@ -1,17 +1,22 @@ set -e set +x -for PYVERSION in 2.7 3.6 3.7; do - virtualenv -p /Library/Frameworks/Python.framework/Versions/${PYVERSION}/bin/python${PYVERSION} venv_${PYVERSION} - . ./venv_${PYVERSION}/bin/activate - curl https://bootstrap.pypa.io/get-pip.py | python - pip install -r requirements/setup.txt - python setup.py bdist_wheel - pip install -r requirements/test.txt +for VER in 2.7 3.6 3.7; do + PIP="pip${VER}" + PYTHON="python${VER}" + VENV="venv_${VER}" + + ${PIP} install virtualenv + virtualenv -p ${PYTHON} ${VENV} + . ./${VENV}/bin/activate + curl https://bootstrap.pypa.io/get-pip.py | ${PYTHON} + ${PIP} install -r requirements/setup.txt + ${PYTHON} setup.py bdist_wheel + ${PIP} install -r requirements/test.txt set +e - pip uninstall -y wolfcrypt + ${PIP} uninstall -y wolfcrypt set -e - pip install wolfcrypt --no-index -f dist + ${PIP} install wolfcrypt --no-index -f dist rm -rf tests/__pycache__ py.test tests deactivate