-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Split out the PyPy monkeypatch * Move Travis checks into hooks
- Loading branch information
1 parent
b3c99ab
commit e83cadf
Showing
5 changed files
with
31 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
|
||
try: | ||
from tox.config import default_factors | ||
except ImportError: | ||
default_factors = None | ||
|
||
|
||
def pypy_version_monkeypatch(): | ||
"""Patch Tox to work with non-default PyPy 3 versions.""" | ||
# Travis virtualenv do not provide `pypy3`, which tox tries to execute. | ||
# This doesnt affect Travis python version `pypy3`, as the pyenv pypy3 | ||
# is in the PATH. | ||
# https://github.com/travis-ci/travis-ci/issues/6304 | ||
# Force use of the virtualenv `python`. | ||
version = os.environ.get('TRAVIS_PYTHON_VERSION') | ||
if version and default_factors and version.startswith('pypy3.3-'): | ||
default_factors['pypy3'] = 'python' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters