Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4f1169

Browse files
authored
Merge pull request h5py#1196 from takluyver/tox-appveyor
Use appveyor plugin for tox
2 parents 830248a + f5526ec commit d4f1169

File tree

3 files changed

+19
-36
lines changed

3 files changed

+19
-36
lines changed

appveyor.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,92 +8,85 @@ environment:
88
### USING HDF5 1.8 ###
99
- PYTHON: "C:\\Python27"
1010
TOXENV: "py27-test-deps"
11-
TOXPYTHON: "%PYTHON%\\python.exe"
1211
HDF5_VSVERSION: "9"
1312
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
1413

1514
- PYTHON: "C:\\Python34"
1615
TOXENV: "py34-test-deps"
17-
TOXPYTHON: "%PYTHON%\\python.exe"
1816
HDF5_VSVERSION: "10"
1917
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
2018

2119
- PYTHON: "C:\\Python35"
2220
TOXENV: "py35-test-deps"
23-
TOXPYTHON: "%PYTHON%\\python.exe"
2421
HDF5_VSVERSION: "14"
2522
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
2623

2724
- PYTHON: "C:\\Python36"
2825
TOXENV: "py36-test-deps"
29-
TOXPYTHON: "%PYTHON%\\python.exe"
3026
HDF5_VSVERSION: "14"
3127
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
3228

3329
- PYTHON: "C:\\Python27-x64"
3430
TOXENV: "py27-test-deps"
35-
TOXPYTHON: "%PYTHON%\\python.exe"
31+
TOX_APPVEYOR_X64: "1"
3632
HDF5_VSVERSION: "9-64"
3733
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
3834

3935
- PYTHON: "C:\\Python34-x64"
4036
TOXENV: "py34-test-deps"
41-
TOXPYTHON: "%PYTHON%\\python.exe"
37+
TOX_APPVEYOR_X64: "1"
4238
HDF5_VSVERSION: "10-64"
4339
DISTUTILS_USE_SDK: "1"
4440
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
4541

4642
- PYTHON: "C:\\Python35-x64"
4743
TOXENV: "py35-test-deps"
48-
TOXPYTHON: "%PYTHON%\\python.exe"
44+
TOX_APPVEYOR_X64: "1"
4945
HDF5_VSVERSION: "14-64"
5046
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
5147

5248
- PYTHON: "C:\\Python36-x64"
5349
TOXENV: "py36-test-deps"
54-
TOXPYTHON: "%PYTHON%\\python.exe"
50+
TOX_APPVEYOR_X64: "1"
5551
HDF5_VSVERSION: "14-64"
5652
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
5753

5854
### USING HDF5 1.10 ###
5955
- PYTHON: "C:\\Python27"
6056
TOXENV: "py27-test-deps"
61-
TOXPYTHON: "%PYTHON%\\python.exe"
6257
HDF5_VSVERSION: "9"
6358
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
6459
HDF5_VERSION: "1.10.1"
6560

6661
- PYTHON: "C:\\Python35"
6762
TOXENV: "py35-test-deps"
68-
TOXPYTHON: "%PYTHON%\\python.exe"
6963
HDF5_VSVERSION: "14"
7064
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
7165
HDF5_VERSION: "1.10.1"
7266

7367
- PYTHON: "C:\\Python36"
7468
TOXENV: "py36-test-deps"
75-
TOXPYTHON: "%PYTHON%\\python.exe"
7669
HDF5_VSVERSION: "14"
7770
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
7871
HDF5_VERSION: "1.10.1"
7972

8073
- PYTHON: "C:\\Python27-x64"
8174
TOXENV: "py27-test-deps"
82-
TOXPYTHON: "%PYTHON%\\python.exe"
75+
TOX_APPVEYOR_X64: "1"
8376
HDF5_VSVERSION: "9-64"
8477
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
8578
HDF5_VERSION: "1.10.1"
8679

8780
- PYTHON: "C:\\Python35-x64"
8881
TOXENV: "py35-test-deps"
89-
TOXPYTHON: "%PYTHON%\\python.exe"
82+
TOX_APPVEYOR_X64: "1"
9083
HDF5_VSVERSION: "14-64"
9184
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
9285
HDF5_VERSION: "1.10.1"
9386

9487
- PYTHON: "C:\\Python36-x64"
9588
TOXENV: "py36-test-deps"
96-
TOXPYTHON: "%PYTHON%\\python.exe"
89+
TOX_APPVEYOR_X64: "1"
9790
HDF5_VSVERSION: "14-64"
9891
HDF5_DIR: "C:\\hdf5\\%HDF5_VERSION%\\%HDF5_VSVERSION%"
9992
HDF5_VERSION: "1.10.1"
@@ -104,7 +97,7 @@ install:
10497
- "py -3.5 -m pip install --upgrade wheel pip setuptools"
10598
- "py -3.5 -m pip install requests"
10699
- "py -3.5 ci\\appveyor\\get_hdf5.py"
107-
- "py -3.5 -m pip install tox codecov"
100+
- "py -3.5 -m pip install tox codecov tox-appveyor"
108101

109102
build: off
110103

ci/fix_paths.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import argparse
1+
import distutils.sysconfig
22
from glob import glob
33
from os import environ
44
from os.path import join as pjoin
@@ -7,15 +7,15 @@
77

88
def main():
99
"""
10-
Fix paths to dlls
10+
Copy HDF5 DLLs into installed h5py package
1111
"""
12-
p = argparse.ArgumentParser()
13-
p.add_argument("sitepackagesdir")
14-
args = p.parse_args()
12+
# This is the function Tox also uses to locate site-packages (Apr 2019)
13+
sitepackagesdir = distutils.sysconfig.get_python_lib()
14+
1515
hdf5_path = environ.get("HDF5_DIR")
1616
if platform.startswith('win'):
1717
for f in glob(pjoin(hdf5_path, 'lib/*.dll')):
18-
copy(f, pjoin(args.sitepackagesdir, 'h5py'))
18+
copy(f, pjoin(sitepackagesdir, 'h5py'))
1919

2020

2121
if __name__ == '__main__':

tox.ini

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,26 @@ deps =
1919
test: pytest
2020
test: pytest-cov
2121
commands =
22-
test: python {toxinidir}/ci/fix_paths.py {envsitepackagesdir}
23-
test: python -m pytest --pyargs h5py --cov={envsitepackagesdir}/h5py --cov-config={toxinidir}/.coveragerc {posargs}
22+
test: python -c "import sys; print('64 bit?', sys.maxsize > 2**32)"
23+
test: python {toxinidir}/ci/fix_paths.py
24+
test: python -m pytest --pyargs h5py --cov=h5py --cov-config={toxinidir}/.coveragerc {posargs}
2425
changedir =
2526
test: {toxworkdir}
2627
passenv =
2728
HDF5_DIR
28-
TOXPYTHON
2929
setenv =
3030
COVERAGE_FILE={toxinidir}/.coverage
3131
# needed otherwise coverage cannot find the file when reporting
32-
basepython =
33-
pypy3: {env:TOXPYTHON:pypy3}
34-
py27: {env:TOXPYTHON:python2.7}
35-
py34: {env:TOXPYTHON:python3.4}
36-
py35: {env:TOXPYTHON:python3.5}
37-
py36: {env:TOXPYTHON:python3.6}
38-
py37: {env:TOXPYTHON:python3.7}
32+
3933
pip_pre =
4034
pre: True
4135

4236
[testenv:nightly]
4337
pip_pre = True
44-
basepython = {env:TOXPYTHON:python3.8}
38+
basepython = python3.8
4539

4640
[testenv:docs]
4741
skip_install=True
48-
basepython = {env:TOXPYTHON:python}
4942
changedir=docs
5043
deps=
5144
sphinx
@@ -54,7 +47,6 @@ commands=
5447

5548
[testenv:check-manifest]
5649
skip_install=True
57-
basepython = {env:TOXPYTHON:python}
5850
deps=check-manifest
5951
setenv =
6052
CHECK_MANIFEST=true
@@ -63,14 +55,12 @@ commands=
6355

6456
[testenv:checkreadme]
6557
skip_install=True
66-
basepython = {env:TOXPYTHON:python}
6758
deps=readme_renderer
6859
commands=
6960
python setup.py check -s -r
7061

7162
[testenv:pre-commit]
7263
skip_install=True
73-
basepython = {env:TOXPYTHON:python}
7464
deps=pre-commit
7565
passenv = HOMEPATH SSH_AUTH_SOCK
7666
commands=

0 commit comments

Comments
 (0)