mac's SIP prevents symlinking so python3 wasn't used ever

pull/658/head
Steven Robertson 6 years ago
parent ccabb46b37
commit f8c8889009

@ -14,11 +14,15 @@ steps:
# stuff into. The virtualenv can probably be removed again, but this was a # stuff into. The virtualenv can probably be removed again, but this was a
# hard-fought battle and for now I am tired of this crap. # hard-fought battle and for now I am tired of this crap.
- script: | - script: |
sudo ln -fs /usr/bin/python$(python.version) /usr/bin/python
# need wheel before building virtualenv because of bdist_wheel and setuptools deps # need wheel before building virtualenv because of bdist_wheel and setuptools deps
/usr/bin/python -m pip install -U pip wheel setuptools # Mac's System Integrity Protection prevents symlinking /usr/bin
/usr/bin/python -m pip install -U virtualenv # and Azure isn't allowing disabling it apparently: https://developercommunityapi.westus.cloudapp.azure.com/idea/558702/allow-disabling-sip-on-microsoft-hosted-macos-agen.html
/usr/bin/python -m virtualenv /tmp/venv -p /usr/bin/python$(python.version) (sudo ln -fs /usr/bin/python$(python.version) /usr/bin/python &&
/usr/bin/python -m pip install -U pip wheel setuptools &&
/usr/bin/python -m pip install -U virtualenv &&
/usr/bin/python -m virtualenv /tmp/venv -p /usr/bin/python$(python.version)) ||
(/usr/bin/python$(python.version) -m pip install -U pip wheel setuptools &&
/usr/bin/python$(python.version) -m venv /tmp/venv)
echo "##vso[task.prependpath]/tmp/venv/bin" echo "##vso[task.prependpath]/tmp/venv/bin"
displayName: activate venv displayName: activate venv

@ -16,7 +16,7 @@ jobs:
python.version: '2.7' python.version: '2.7'
MODE: mitogen MODE: mitogen
Ans288_37: Ans288_37:
python.version: '3.7' python.version: '3'
MODE: localhost_ansible MODE: localhost_ansible
VER: 2.8.8 VER: 2.8.8

Loading…
Cancel
Save