mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Add support for Python 3.9 build testing (#1018)
* First stab at adding Python 3.9 dev Travis builds * Dynamically replace Python max version for Python 3.9 beta builds * Fix allow_failures (3.9-dev, not 3.9) and fix Windows find-and-replace command to allow 3.9 * Fix allow_failures to allow all three Python 3.9 builds to fail * Use platform-independent Python script to allow all Python versions for 3.9 builds * Format changes and changing before_install to script for 3.9 builds * Install toml module to make it possible to run version-changing script before install * Properly populate before_install step with Mac and Windows Python 3.9, and remove extraneous unused python key * Add refreshenv to get python3 path included in WIndows * Ensure MacOS pyenv is up to date and attempt to reference Windows python3 directly * Use bash-friendly paths in Windows and check to see exactly what the Python 3.9 executable is * Confirm Python version in Windows and attempt to get pip a different way * Fiddling with Windows python references * Remove Python3.6 references and check for Python directory in root directory * Add Python 3.9 path to Windows build * Remove pip steps that should be unnecessary * Add upgrade pip to Windows Python 3.9 build * Attempt to resolve "access denied" error when upgrading pip on Windows * Use allow_all_python_version TOML script in nightly build instead of sed
This commit is contained in:
parent
6f71c98e13
commit
3c7dcbadbe
2 changed files with 46 additions and 3 deletions
8
.build/allow_all_python_version.py
Normal file
8
.build/allow_all_python_version.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import toml
|
||||||
|
|
||||||
|
pyproject = toml.load("pyproject.toml")
|
||||||
|
|
||||||
|
pyproject["tool"]["poetry"]["dependencies"]["python"] = "*"
|
||||||
|
|
||||||
|
with open("pyproject.toml", "w") as toml_file:
|
||||||
|
toml.dump(pyproject, toml_file)
|
41
.travis.yml
41
.travis.yml
|
@ -44,13 +44,13 @@ aliases:
|
||||||
os: windows
|
os: windows
|
||||||
language: shell
|
language: shell
|
||||||
env: &env_windows
|
env: &env_windows
|
||||||
PATH: /c/Python36:/c/Python36/Scripts:/c/Python37:/c/Python37/Scripts:/c/Python38:/c/Python38/Scripts:$PATH
|
PATH: /c/Python37:/c/Python37/Scripts:/c/Python38:/c/Python38/Scripts:/c/Python39:/c/Python39/Scripts:$PATH
|
||||||
PYTHONIOENCODING: UTF-8
|
PYTHONIOENCODING: UTF-8
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- /c/Python36
|
|
||||||
- /c/Python37
|
- /c/Python37
|
||||||
- /c/Python38
|
- /c/Python38
|
||||||
|
- /c/Python39
|
||||||
- /c/ProgramData/chocolatey/lib
|
- /c/ProgramData/chocolatey/lib
|
||||||
- /c/ProgramData/chocolatey/bin
|
- /c/ProgramData/chocolatey/bin
|
||||||
- /c/Users/travis/AppData/Local/pypoetry/Cache
|
- /c/Users/travis/AppData/Local/pypoetry/Cache
|
||||||
|
@ -62,6 +62,9 @@ aliases:
|
||||||
jobs:
|
jobs:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
- name: Python 3.9 on Windows
|
||||||
|
- name: Python 3.9 on Linux
|
||||||
|
- name: Python 3.9 on MacOS
|
||||||
- python: nightly
|
- python: nightly
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
@ -105,10 +108,42 @@ jobs:
|
||||||
<<: *env_windows
|
<<: *env_windows
|
||||||
JRNL_PYTHON_VERSION: 3.8.2
|
JRNL_PYTHON_VERSION: 3.8.2
|
||||||
|
|
||||||
|
# Python 3.9 Dev Tests
|
||||||
|
- name: Python 3.9 on Linux
|
||||||
|
before_install:
|
||||||
|
- pip install toml
|
||||||
|
- python .build/allow_all_python_version.py
|
||||||
|
python: 3.9-dev
|
||||||
|
- <<: *test_mac
|
||||||
|
name: Python 3.9 on MacOS
|
||||||
|
before_install:
|
||||||
|
- brew upgrade pyenv
|
||||||
|
- eval "$(pyenv init -)"
|
||||||
|
- pyenv install -s $JRNL_PYTHON_VERSION
|
||||||
|
- pyenv global $JRNL_PYTHON_VERSION
|
||||||
|
- pip install --upgrade pip
|
||||||
|
- pip --version
|
||||||
|
- pip install toml
|
||||||
|
- python .build/allow_all_python_version.py
|
||||||
|
env:
|
||||||
|
JRNL_PYTHON_VERSION: 3.9.0b5
|
||||||
|
- <<: *test_windows
|
||||||
|
name: Python 3.9 on Windows
|
||||||
|
before_install:
|
||||||
|
- choco install python --pre
|
||||||
|
- python --version
|
||||||
|
- python -m pip install --upgrade pip
|
||||||
|
- pip --version
|
||||||
|
- pip install toml
|
||||||
|
- python .build/allow_all_python_version.py
|
||||||
|
env:
|
||||||
|
<<: *env_windows
|
||||||
|
JRNL_PYTHON_VERSION: 3.9.0b5
|
||||||
|
|
||||||
# ... and beyond!
|
# ... and beyond!
|
||||||
- name: Python nightly on Linux
|
- name: Python nightly on Linux
|
||||||
before_install:
|
before_install:
|
||||||
- sed -i 's/^python = ">=3\.6\.0.*"$/python = "*"/' pyproject.toml
|
- python .build/allow_all_python_version.py
|
||||||
python: nightly
|
python: nightly
|
||||||
|
|
||||||
# Specialty tests
|
# Specialty tests
|
||||||
|
|
Loading…
Add table
Reference in a new issue