From d89a715622bcfde8a82f27e391ad73ceea547038 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 27 Sep 2019 15:11:28 -0700 Subject: [PATCH 1/3] 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 From 255b5bce3be2f5cc77816fbff45fb97329b2a03e Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 27 Sep 2019 16:09:02 -0700 Subject: [PATCH 2/3] Build Update One more update to make the build_wheels scripts the same. --- make/osx/build_wheels.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/make/osx/build_wheels.sh b/make/osx/build_wheels.sh index 46ec2ec..1074446 100755 --- a/make/osx/build_wheels.sh +++ b/make/osx/build_wheels.sh @@ -6,11 +6,15 @@ for VER in 2.7 3.6 3.7; do PYTHON="python${VER}" VENV="venv_${VER}" - ${PIP} install virtualenv - virtualenv -p ${PYTHON} ${VENV} - . ./${VENV}/bin/activate + # update pip for newer TLS support curl https://bootstrap.pypa.io/get-pip.py | ${PYTHON} ${PIP} install -r requirements/setup.txt + + # update virtualenv + ${PIP} install --upgrade virtualenv + virtualenv -p ${PYTHON} ${VENV} + . ./${VENV}/bin/activate + ${PYTHON} setup.py bdist_wheel ${PIP} install -r requirements/test.txt set +e From a4d6dc6d279f0df8014a5186b6f53a50fcba61bc Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 6 Dec 2019 07:49:58 -0800 Subject: [PATCH 3/3] Fix spelling error. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 68fa599..c062452 100644 --- a/README.rst +++ b/README.rst @@ -26,7 +26,7 @@ We provide Python wheels (prebuilt binaries) for OSX 64 bits and Linux 64 bits: To build wolfcrypt-py against a local installation of the native C wolfSSL library, use the USE_LOCAL_WOLFSSL variable. This variable should be -wolfcrypt-py can be built against a local verison of the native wolfSSL +wolfcrypt-py can be built against a local version of the native wolfSSL library by using pip with the USE_LOCAL_WOLFSSL variable. USE_LOCAL_WOLFSSL should be set equal to the installation path for the wolfSSL library: