@@ -12,7 +12,7 @@ Helps to install Python to Travis CI machines in Linux, macOS and Windows.
1212_ travis-python_ is just a Bash script providing a helper function:
1313
1414``` bash
15- install_python $LOCATION $SPECIFIER
15+ install_python < location > < specifier >
1616```
1717
1818The specified Python version, if found, will be installed at the specified
@@ -35,89 +35,31 @@ Usage
3535To be able to use _ travis-python_ , the Travis machine needs to be configured
3636to be able to run in the three operating systems.
3737
38- First, use a ` shell ` environment as it is the only minimal environment available
39- in the three OS :
38+ The easiest way to do it is to [ import ] [ travis-config-imports ] the shared
39+ configuration snippet :
4040
4141``` yaml
42- language : shell
42+ import : neimad/travis-python:dev.yml
4343` ` `
4444
45- Then, specify the required operating systems:
45+ Read [ the configuration documentation] to understand how it works.
4646
47- ` ` ` yaml
48- os :
49- - linux
50- - osx
51- - windows
52- ` ` `
53-
54- Finally, load the _travis-python_ script during the ` pre-install` phase:
47+ Then, specify the wanted Python version using the ` PYTHON` environment
48+ variable :
5549
5650` ` ` yaml
57- pre-install:
58- - curl -o travis-python.bash -sSL https://git.io/JeaZo
59- && source travis-python.bash
60- - install_python $LOCATION $VERSION
61- ` ` `
51+ import: neimad/travis-python:dev.yml
6252
63- # ## Jobs for multiple Python versions
64-
65- You can run jobs for multiple Python versions by using an environment variable
66- within the job matrix :
67-
68- ` ` ` yaml
6953env:
70- - PYTHON="3.7"
71- - PYTHON="3.6"
72-
73- pre-install:
74- - install_python $LOCATION $PYTHON
54+ - PYTHON=3.8
55+ - PYTHON=3.7
56+ - PYTHON=2
7557` ` `
58+ By default, it will generate a build matrix using the three operating systems
59+ available on Travis CI (Linux, macOS and Windows).
7660
77- # ## Caching data
78-
79- To speed up your jobs, you can cache the Python environment :
80-
81- ` ` ` yaml
82- pre-install:
83- - install_python $HOME/Python $PYTHON
84-
85- cache:
86- directories:
87- - $HOME/Python
88- ` ` `
89-
90- # ## Minimal recommended configuration
91-
92- ` ` ` yaml
93- language: shell
94-
95- os:
96- - linux
97- - osx
98- - windows
99-
100- osx_image: xcode11
101-
102- env:
103- - PYTHON="3.8"
104- - PYTHON="3.7"
105- - PYTHON="3.6"
106- - PYTHON="2"
107-
108- pre-install:
109- - curl -o travis-python.bash -sSL https://git.io/JeaZo
110- && source travis-python.bash
111- - install_python $HOME/Python $PYTHON
112-
113- install: ...
114-
115- script: ...
116-
117- cache:
118- directories:
119- - $HOME/Python
120- ` ` `
61+ The Python distribution is installed during the `pre-install` phase and
62+ available using the `python` program name (whether it is Python 2 or 3).
12163
12264Behind the scene
12365----------------
@@ -168,14 +110,17 @@ License
168110
169111` travis-python` is licensed under the [GNU GPL 3 or later][license].
170112
171- [license] : https://github.com/neimad/travis-python/blob/master/LICENSE.md
172- [the changelog] : CHANGELOG.md
173- [ci] : https://travis-ci.org/neimad/travis-python
174113[ci-badge] : https://img.shields.io/travis/neimad/travis-python?style=flat-square
175114[release-badge] : https://img.shields.io/github/v/tag/neimad/travis-python?sort=semver&style=flat-square
176-
177115[license-badge] : https://img.shields.io/github/license/neimad/travis-python?style=flat-square
116+
117+ [license] : LICENSE.md
118+ [the changelog] : CHANGELOG.md
119+ [the configuration documentation] : doc/Travis_Configuration.md
178120[look at the existing tickets] : https://github.com/neimad/travis-python/issues
179121[make a pull request] : https://github.com/neimad/travis-python/pulls
122+ [ci] : https://travis-ci.org/neimad/travis-python
123+
180124[travis-python-versions] : https://docs.travis-ci.com/user/languages/python/#specifying-python-versions
125+ [travis-config-imports] : https://docs.travis-ci.com/user/build-config-imports/
181126[shellspec] : https://shellspec.info
0 commit comments