Skip to content

Commit 2982c71

Browse files
committed
Build Update
1. Replaced the versioned venv paths in gitignore with a wildcard, like in the wolfCrypt 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.
1 parent c2c7ee5 commit 2982c71

2 files changed

Lines changed: 15 additions & 19 deletions

File tree

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ target/
6464
.python-version
6565

6666
# pyenv dist build
67-
venv_2.7
68-
venv_3.4
69-
venv_3.5
70-
venv_3.6
67+
venv_*
7168

7269
# code editor preferences
7370
.vscode

make/osx/build_wheels.sh

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
set -e
22
set +x
33

4-
for PYVERSION in 2.7 3.4 3.5 3.6; do
5-
PYTHONBIN=/Library/Frameworks/Python.framework/Versions/${PYVERSION}/bin
6-
PYTHONEXE=${PYTHONBIN}/python${PYVERSION}
7-
export PATH="${PYTHONBIN}":$PATH
4+
for VER in 2.7 3.4 3.5 3.6 3.7; do
5+
PYTHON=python${VER}
6+
PIP=pip${VER}
7+
VENV=venv_${VER}
88

99
# update pip for newer TLS support
10-
curl https://bootstrap.pypa.io/get-pip.py | ${PYTHONEXE}
11-
"${PYTHONBIN}/pip" install --upgrade pip
10+
curl https://bootstrap.pypa.io/get-pip.py | ${PYTHON}
11+
${PIP} install --upgrade pip
1212

1313
# update virtualenv
14-
${PYTHONEXE} -m pip install virtualenv
15-
16-
virtualenv -p ${PYTHONEXE} venv_${PYVERSION}
17-
. ./venv_${PYVERSION}/bin/activate
14+
${PIP} install --upgrade virtualenv
15+
virtualenv -p ${PYTHON} ${VENV}
16+
. ./${VENV}/bin/activate
1817

1918
# install cffi module
20-
${PYTHONEXE} -m pip install cffi
19+
${PYTHON} -m pip install cffi
2120

22-
${PYTHONEXE} setup.py bdist_wheel
23-
"${PYTHONBIN}/pip" install -r requirements/test.txt
21+
${PYTHON} setup.py bdist_wheel
22+
${PIP} install -r requirements/test.txt
2423
set +e
25-
"${PYTHONBIN}/pip" uninstall -y wolfssl
24+
${PIP} uninstall -y wolfssl
2625
set -e
27-
"${PYTHONBIN}/pip" install wolfssl --no-index -f dist
26+
${PIP} install wolfssl --no-index -f dist
2827
rm -rf tests/__pycache__
2928
py.test tests
3029
deactivate

0 commit comments

Comments
 (0)