Ubuntu Python 3 as default
Hello,
Im trying to add a matrix for Ubuntu with python 3 as the default python interpreter. Meaning, i need to have python
= python3
I have tried to use alias python='python3'
and stack: python 3
but those do not seem to work.
I have no trouble with the Windows builds, just Ubuntu w/python3. Here is my .yml, any help is appreciated:
version: '1.0.{build}'
environment:
GEO_VERSION: '18b'
matrix:
# Windows w/64 bit Geo & python 3.6
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python36-x64"
PYTHON_ARCH: "64"
# Windows w/64 bit Geo & python 2.7
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python27-x64"
PYTHON_ARCH: "64"
# Windows w/32 bit Geo & python 3.6
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python36"
PYTHON_ARCH: "32"
# Windows w/32 bit Geo & python 2.7
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python27"
PYTHON_ARCH: "32"
# Ubuntu - python 2.7
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
# Ubuntu - python 3
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
stack: python 3
build_script:
- ps: .\appveyor\build.ps1
install:
- pip install --user -e .[dev] # user flag to prevent permission errors
test_script:
- invoke test all
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Owen McDonnell on 21 Dec, 2018 05:29 PM
Have you tried
stack: python 3.4
orstack: python 3.5
etc. ?2 Posted by Ian on 21 Dec, 2018 06:27 PM
yes i have tried
stack
set to python 3.4, 3.5 and 3.6. The system interpreter is still set to python 2.7 as you can see from thebuild_script
phase:Support Staff 3 Posted by Owen McDonnell on 21 Dec, 2018 06:53 PM
Sorry, I forgot to mention,
stack:
should be at top level of yaml. (i.e. the same level asbuild_script:
).4 Posted by Ian on 21 Dec, 2018 07:13 PM
So if I understand correctly,
stack
wont allow me to specify the python version in each build? it seems it's a constant used by all builds.I need to test in both python 2.7 and python 3+ on windows and linux. Windows needs to be tested in both x86 and x64 python versions - this is 6 builds altogether. Im not sure how I would achieve this using
stack
. Should i be modifying the system path in linux as I have done in the windows builds, or is there an easier way?Thanks in advance.
5 Posted by Ian on 21 Dec, 2018 07:26 PM
Maybe I have it understood now. I will try this:
6 Posted by Ian on 21 Dec, 2018 07:38 PM
the above will set both Ubuntu builds to python 3. Not able to use python 2.7 as intended in first build.
7 Posted by Ian on 22 Dec, 2018 02:03 AM
You were right. I needed to understand the execution better. I got it to work with this:
Feel free to make this thread pubic if you think it's useful.
Support Staff 8 Posted by Owen McDonnell on 22 Dec, 2018 08:05 AM
Sorry for not clarifying earlier. Anyway, you figured it out.
Sure, I'll make the thread public so its searchable.
Ilya Finkelshteyn closed this discussion on 21 Feb, 2019 09:00 PM.