Skip to content

Commit 8649cfa

Browse files
committed
Add python 3.8 in test grid and some other minor layout updates.
1 parent 33e7037 commit 8649cfa

File tree

14 files changed

+149
-58
lines changed

14 files changed

+149
-58
lines changed

.appveyor.yml

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,64 @@ environment:
125125
PYTHON_VERSION: '3.7'
126126
PYTHON_ARCH: '64'
127127
WHEEL_PATH: .tox/dist
128+
- TOXENV: py38-cover,codecov,coveralls
129+
TOXPYTHON: C:\Python38\python.exe
130+
PYTHON_HOME: C:\Python38
131+
PYTHON_VERSION: '3.8'
132+
PYTHON_ARCH: '32'
133+
- TOXENV: py38-cover,codecov,coveralls
134+
TOXPYTHON: C:\Python38-x64\python.exe
135+
PYTHON_HOME: C:\Python38-x64
136+
PYTHON_VERSION: '3.8'
137+
PYTHON_ARCH: '64'
138+
- TOXENV: py38-nocov
139+
TOXPYTHON: C:\Python38\python.exe
140+
PYTHON_HOME: C:\Python38
141+
PYTHON_VERSION: '3.8'
142+
PYTHON_ARCH: '32'
143+
WHEEL_PATH: .tox/dist
144+
- TOXENV: py38-nocov
145+
TOXPYTHON: C:\Python38-x64\python.exe
146+
PYTHON_HOME: C:\Python38-x64
147+
PYTHON_VERSION: '3.8'
148+
PYTHON_ARCH: '64'
149+
WHEEL_PATH: .tox/dist
128150
init:
129151
- ps: echo $env:TOXENV
130152
- ps: ls C:\Python*
131153
install:
132-
- '%PYTHON_HOME%\python -mpip install --progress-bar=off --verbose twine tox-wheel -rci/requirements.txt'
154+
- ps: |
155+
Set-PSDebug -Trace 1
156+
if ($Env:TOXENV.StartsWith("py38")) {
157+
if ($Env:PYTHON_ARCH -eq "64") {
158+
iex "choco install python3 --version=3.8 --no-progress --params /InstallDir:$Env:PYTHON_HOME"
159+
} else {
160+
iex "choco install python3 --version=3.8 --no-progress --params /InstallDir:$Env:PYTHON_HOME --x86"
161+
}
162+
}
163+
- '%PYTHON_HOME%\python -mpip install --progress-bar=off twine tox-wheel -rci/requirements.txt'
133164
- '%PYTHON_HOME%\Scripts\virtualenv --version'
134165
- '%PYTHON_HOME%\Scripts\easy_install --version'
135166
- '%PYTHON_HOME%\Scripts\pip --version'
136167
- '%PYTHON_HOME%\Scripts\tox --version'
137168
test_script:
138169
- cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd %PYTHON_HOME%\Scripts\tox
139170
on_success:
140-
- IF DEFINED WHEEL_PATH %PYTHON_HOME%\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing %WHEEL_PATH%/*.whl
141-
171+
- ps: |
172+
Set-PSDebug -Trace 1
173+
if ($Env:WHEEL_PATH) {
174+
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox --wheel
175+
if ($LastExitCode -eq 0) {
176+
$ErrorActionPreference = "Stop"
177+
iex "$Env:PYTHON_HOME\Scripts\twine check $Env:WHEEL_PATH/*.whl"
178+
iex "$Env:PYTHON_HOME\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $Env:WHEEL_PATH/*.whl"
179+
}
180+
} else {
181+
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox
182+
}
183+
if ($LastExitCode -ne 0) {
184+
$host.SetShouldExit($LastExitCode)
185+
}
142186
on_failure:
143187
- ps: dir "env:"
144188
- ps: get-content .tox\*\log\*

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# see http://editorconfig.org
1+
# see https://editorconfig.org/
22
root = true
33

44
[*]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.py[cod]
2+
__pycache__
23

34
# C extensions
45
*.so
@@ -61,6 +62,7 @@ docs/_build
6162
.env
6263
.cache
6364
.pytest
65+
.benchmarks
6466
.bootstrap
6567
.appveyor.token
6668
*.bak

.travis.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,13 @@ matrix:
1616
- TOXENV=docs
1717
- os: osx
1818
language: generic
19-
cache:
20-
directories:
21-
- $HOME/Library/Caches/Homebrew
22-
- $HOME/Library/Caches/pip
2319
env:
2420
- TOXENV=py27-cover
2521
- env:
2622
- TOXENV=py27-cover,codecov,extension-coveralls,coveralls
2723
python: '2.7'
2824
- os: osx
2925
language: generic
30-
cache:
31-
directories:
32-
- $HOME/Library/Caches/Homebrew
33-
- $HOME/Library/Caches/pip
3426
env:
3527
- TOXENV=py27-nocov
3628
- WHEEL_PATH=.tox/dist
@@ -65,21 +57,13 @@ matrix:
6557
python: '3.6'
6658
- os: osx
6759
language: generic
68-
cache:
69-
directories:
70-
- $HOME/Library/Caches/Homebrew
71-
- $HOME/Library/Caches/pip
7260
env:
7361
- TOXENV=py37-cover
7462
- env:
7563
- TOXENV=py37-cover,codecov,extension-coveralls,coveralls
7664
python: '3.7'
7765
- os: osx
7866
language: generic
79-
cache:
80-
directories:
81-
- $HOME/Library/Caches/Homebrew
82-
- $HOME/Library/Caches/pip
8367
env:
8468
- TOXENV=py37-nocov
8569
- WHEEL_PATH=.tox/dist
@@ -88,20 +72,28 @@ matrix:
8872
- WHEEL_MANYLINUX1=cp37
8973
- WHEEL_PATH=wheelhouse
9074
python: '3.7'
75+
- env:
76+
- TOXENV=py38-cover,codecov,extension-coveralls,coveralls
77+
python: '3.8'
78+
- env:
79+
- TOXENV=py38-nocov
80+
- WHEEL_MANYLINUX1=cp38
81+
- WHEEL_PATH=wheelhouse
82+
python: '3.8'
9183
- env:
9284
- TOXENV=pypy-cover,codecov,extension-coveralls,coveralls
93-
python: 'pypy2.7-6.0'
85+
python: 'pypy'
9486
- env:
9587
- TOXENV=pypy-nocov
96-
python: 'pypy2.7-6.0'
88+
python: 'pypy'
9789
- env:
9890
- TOXENV=pypy3-cover,codecov,extension-coveralls,coveralls
9991
- TOXPYTHON=pypy3
100-
python: 'pypy3.5-6.0'
92+
python: 'pypy3'
10193
- env:
10294
- TOXENV=pypy3-nocov
10395
- TOXPYTHON=pypy3
104-
python: 'pypy3.5-6.0'
96+
python: 'pypy3'
10597
before_install:
10698
- python --version
10799
- uname -a
@@ -113,7 +105,7 @@ before_install:
113105
export PATH="/usr/local/opt/python/libexec/bin:${PATH}"
114106
fi
115107
install:
116-
- python -mpip install --progress-bar=off --verbose twine tox-wheel -rci/requirements.txt
108+
- python -mpip install --progress-bar=off twine tox-wheel -rci/requirements.txt
117109
- virtualenv --version
118110
- easy_install --version
119111
- pip --version

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Changelog
33
=========
44

5+
1.4.3 (2019-10-26)
6+
------------------
7+
8+
* Added binary wheels for Python 3.8.
9+
* Fixed license metadata.
10+
511
1.4.2 (2019-08-22)
612
------------------
713

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ To set up `python-lazy-object-proxy` for local development:
4141
(look for the "Fork" button).
4242
2. Clone your fork locally::
4343

44-
git clone [email protected]:your_name_here/python-lazy-object-proxy.git
44+
git clone [email protected]:ionelmc/python-lazy-object-proxy.git
4545

4646
3. Create a branch for local development::
4747

4848
git checkout -b name-of-your-bugfix-or-feature
4949

5050
Now you can make your changes locally.
5151

52-
4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.io/en/latest/install.html>`_ one command::
52+
4. When you're done making changes run all the checks and docs builder with `tox <https://tox.readthedocs.io/en/latest/install.html>`_ one command::
5353

5454
tox
5555

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Overview
1919
:target: https://readthedocs.org/projects/python-lazy-object-proxy
2020
:alt: Documentation Status
2121

22-
.. |travis| image:: https://travis-ci.org/ionelmc/python-lazy-object-proxy.svg?branch=master
22+
.. |travis| image:: https://api.travis-ci.org/ionelmc/python-lazy-object-proxy.svg?branch=master
2323
:alt: Travis-CI Build Status
2424
:target: https://travis-ci.org/ionelmc/python-lazy-object-proxy
2525

ci/bootstrap.py

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@
55
from __future__ import unicode_literals
66

77
import os
8+
import subprocess
89
import sys
910
from os.path import abspath
1011
from os.path import dirname
1112
from os.path import exists
1213
from os.path import join
13-
from os.path import normpath
1414

15-
try:
16-
from os.path import samefile
17-
except ImportError:
18-
def samefile(a, b):
19-
return normpath(abspath(a)) == normpath(abspath(b))
15+
base_path = dirname(dirname(abspath(__file__)))
2016

2117

22-
if __name__ == "__main__":
23-
base_path = dirname(dirname(abspath(__file__)))
24-
print("Project path: {0}".format(base_path))
18+
def check_call(args):
19+
print("+", *args)
20+
subprocess.check_call(args)
21+
22+
23+
def exec_in_env():
2524
env_path = join(base_path, ".tox", "bootstrap")
2625
if sys.platform == "win32":
2726
bin_path = join(env_path, "Scripts")
@@ -32,21 +31,26 @@ def samefile(a, b):
3231

3332
print("Making bootstrap env in: {0} ...".format(env_path))
3433
try:
35-
subprocess.check_call(["virtualenv", env_path])
34+
check_call([sys.executable, "-m", "venv", env_path])
3635
except subprocess.CalledProcessError:
37-
subprocess.check_call([sys.executable, "-m", "virtualenv", env_path])
36+
try:
37+
check_call([sys.executable, "-m", "virtualenv", env_path])
38+
except subprocess.CalledProcessError:
39+
check_call(["virtualenv", env_path])
3840
print("Installing `jinja2` into bootstrap environment...")
39-
subprocess.check_call([join(bin_path, "pip"), "install", "jinja2"])
41+
check_call([join(bin_path, "pip"), "install", "jinja2", "tox"])
4042
python_executable = join(bin_path, "python")
4143
if not os.path.exists(python_executable):
4244
python_executable += '.exe'
43-
if not samefile(python_executable, sys.executable):
44-
print("Re-executing with: {0}".format(python_executable))
45-
os.execv(python_executable, [python_executable, __file__])
4645

46+
print("Re-executing with: {0}".format(python_executable))
47+
print("+ exec", python_executable, __file__, "--no-env")
48+
os.execv(python_executable, [python_executable, __file__, "--no-env"])
49+
50+
def main():
4751
import jinja2
4852

49-
import subprocess
53+
print("Project path: {0}".format(base_path))
5054

5155
jinja = jinja2.Environment(
5256
loader=jinja2.FileSystemLoader(join(base_path, "ci", "templates")),
@@ -71,3 +75,15 @@ def samefile(a, b):
7175
fh.write(jinja.get_template(name).render(tox_environments=tox_environments))
7276
print("Wrote {}".format(name))
7377
print("DONE.")
78+
79+
80+
if __name__ == "__main__":
81+
args = sys.argv[1:]
82+
if args == ["--no-env"]:
83+
main()
84+
elif not args:
85+
exec_in_env()
86+
else:
87+
print("Unexpected arguments {0}".format(args), file=sys.stderr)
88+
sys.exit(1)
89+

ci/templates/.appveyor.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,38 @@ init:
3939
- ps: echo $env:TOXENV
4040
- ps: ls C:\Python*
4141
install:
42-
- '%PYTHON_HOME%\python -mpip install --progress-bar=off --verbose twine tox-wheel -rci/requirements.txt'
42+
- ps: |
43+
Set-PSDebug -Trace 1
44+
if ($Env:TOXENV.StartsWith("py38")) {
45+
if ($Env:PYTHON_ARCH -eq "64") {
46+
iex "choco install python3 --version=3.8 --no-progress --params /InstallDir:$Env:PYTHON_HOME"
47+
} else {
48+
iex "choco install python3 --version=3.8 --no-progress --params /InstallDir:$Env:PYTHON_HOME --x86"
49+
}
50+
}
51+
- '%PYTHON_HOME%\python -mpip install --progress-bar=off twine tox-wheel -rci/requirements.txt'
4352
- '%PYTHON_HOME%\Scripts\virtualenv --version'
4453
- '%PYTHON_HOME%\Scripts\easy_install --version'
4554
- '%PYTHON_HOME%\Scripts\pip --version'
4655
- '%PYTHON_HOME%\Scripts\tox --version'
4756
test_script:
4857
- cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd %PYTHON_HOME%\Scripts\tox
4958
on_success:
50-
- IF DEFINED WHEEL_PATH %PYTHON_HOME%\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing %WHEEL_PATH%/*.whl
51-
59+
- ps: |
60+
Set-PSDebug -Trace 1
61+
if ($Env:WHEEL_PATH) {
62+
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox --wheel
63+
if ($LastExitCode -eq 0) {
64+
$ErrorActionPreference = "Stop"
65+
iex "$Env:PYTHON_HOME\Scripts\twine check $Env:WHEEL_PATH/*.whl"
66+
iex "$Env:PYTHON_HOME\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $Env:WHEEL_PATH/*.whl"
67+
}
68+
} else {
69+
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox
70+
}
71+
if ($LastExitCode -ne 0) {
72+
$host.SetShouldExit($LastExitCode)
73+
}
5274
on_failure:
5375
- ps: dir "env:"
5476
- ps: get-content .tox\*\log\*

ci/templates/.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ matrix:
1818
{%- if 'py37' in env or 'py27' in env %}{{ '' }}
1919
- os: osx
2020
language: generic
21-
cache:
22-
directories:
23-
- $HOME/Library/Caches/Homebrew
24-
- $HOME/Library/Caches/pip
2521
env:
2622
- TOXENV={{ env }}
2723
{%- if 'nocov' in env %}{{ '' }}
@@ -36,9 +32,9 @@ matrix:
3632
{%- endif %}
3733
{%- if env.startswith('pypy3') %}{{ '' }}
3834
- TOXPYTHON=pypy3
39-
python: 'pypy3.5-6.0'
35+
python: 'pypy3'
4036
{%- elif env.startswith('pypy') %}{{ '' }}
41-
python: 'pypy2.7-6.0'
37+
python: 'pypy'
4238
{%- else %}{{ '' }}
4339
python: '{{ '{0[2]}.{0[3]}'.format(env) }}'
4440
{%- endif %}
@@ -54,7 +50,7 @@ before_install:
5450
export PATH="/usr/local/opt/python/libexec/bin:${PATH}"
5551
fi
5652
install:
57-
- python -mpip install --progress-bar=off --verbose twine tox-wheel -rci/requirements.txt
53+
- python -mpip install --progress-bar=off twine tox-wheel -rci/requirements.txt
5854
- virtualenv --version
5955
- easy_install --version
6056
- pip --version

0 commit comments

Comments
 (0)