My build config is like this:
language: python
dist: bionic
os:
- linux
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.8-dev"
- "nightly"
- "pypy3"
jobs:
- name: "Python 3.7 on macOS"
os: osx
osx_image: xcode11.2
language: shell
before_install:
- alias python='python3'
allow_failures:
- python: "3.8-dev"
- python: "nightly"
install:
# Upgrade pip
- python -m pip install --upgrade pip
script:
- python --version
- python setup.py install
- python setup.py test
As you can see, I have a project and it is tested with pytest
. Everything goes well until my osx
build. (The build didn’t even fail on the Python2.7 Bionic Ubuntu
environment.)
The special configuration of osx
is pasted and modified from the documentation. But python failed to install my pytest
framework on the python setup.py install
sentence.
The error goes like:
Searching for pytest
Reading https://pypi.org/simple/pytest/
Downloading https://files.pythonhosted.org/packages/d4/d1/61dbeb5e6d6a694c4d024043ad67a01ba236c54d253558b3019b6fac2c68/pytest-6.1.0.tar.gz#sha256=d010e24666435b39a4cf48740b039885642b6c273a3f77be3e7e03554d2806b7
Best match: pytest 6.1.0
Processing pytest-6.1.0.tar.gz
Writing /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/easy_install-jhPaOa/pytest-6.1.0/setup.cfg
Running pytest-6.1.0/setup.py -q bdist_egg --dist-dir /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/easy_install-jhPaOa/pytest-6.1.0/egg-dist-tmp-4xoTGJ
File "build/bdist.macosx-10.14-x86_64/egg/pytest/collect.py", line 24
def __init__(self) -> None:
^
SyntaxError: invalid syntax
PS: The dependencies are declared in setuptools.setup(tests_require=[...])
.
PS2: The python --version
shows that python2
is still actually executed.