Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

Commit 7aca2af

Browse files
committed
Use conda to install pydot on AppVeyor
pydot-ng needs a way to be tests on conda installation since it is often used in science-related packages
1 parent 8817b21 commit 7aca2af

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

appveyor.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Appveyor, continuous integration for Windows
22
# Most of the config comes from:
3-
# * https://github.com/nedbat/coveragepy/blob/master/appveyor.yml
4-
# * https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
3+
# * https://gitlab.com/betse/betse/raw/master/appveyor.yml
54

65
version: '{branch}-{build}'
76

@@ -19,43 +18,39 @@ skip_branch_with_pr: true
1918

2019
environment:
2120

22-
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\run_with_env.cmd"
23-
24-
# Parallel pytest gets tangled up with tests that try to create and destroy
25-
# .pth files in the shared virtualenv. Disable parallel tests.
26-
PYTEST_ADDOPTS: "-n 0"
27-
2821
matrix:
2922
- JOB: "2.7 32-bit"
3023
TOXENV: "py27"
3124
PYTHON: "C:\\Python27.11"
3225
PYTHON_ARCH: "32"
26+
MINICONDA_DIRNAME: "C:\\Miniconda"
3327

3428
- JOB: "3.6 64-bit"
3529
TOXENV: "py36"
3630
PYTHON: "C:\\Python36-x64"
3731
PYTHON_ARCH: "64"
32+
MINICONDA_DIRNAME: "C:\\Miniconda36-x64"
3833

3934
init:
40-
- "ECHO %TOXENV%"
35+
- "ECHO %TOXENV% %PYTHON_VERSION% %MINICONDA_DIRNAME%"
4136

4237
install:
43-
- cinst graphviz
44-
# Prepend Python to the PATH of this build (this cannot be
45-
# done from inside the powershell script as it would require to restart
46-
# the parent CMD process).
47-
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
38+
# Make sure that python and python-related scripts are run from miniconda-specific
39+
# python installation
40+
- cmd: set "PATH=%MINICONDA_DIRNAME%;%MINICONDA_DIRNAME%\\Scripts;%PATH%"
41+
- cmd: conda config --set always_yes true
42+
- cmd: conda info --all
4843

49-
# Check that we have the expected version and architecture for Python
50-
- "python --version"
51-
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
44+
# Create and configure an empty Anaconda environment specific to this Python version.
45+
- cmd: conda create --quiet --name conda-env-%PYTHON_VERSION% python=%PYTHON_VERSION%
46+
- cmd: activate conda-env-%PYTHON_VERSION%
47+
- cmd: conda config --add channels anaconda
48+
- cmd: conda install --quiet --file requirements-conda.txt
49+
- cmd: python setup.py develop
5250

53-
# Upgrade to the latest version of pip to avoid it displaying warnings
54-
# about it being out of date.
55-
- "python -m pip install --upgrade pip"
56-
- "python -m pip install --upgrade tox"
5751

52+
# Tell AppVeyor this is not .NET project
5853
build: off
5954

6055
test_script:
61-
- tox
56+
- py.test -vvv test

requirements-conda.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
graphviz >=2.38.0
2+
pyparsing >=2.0.1
3+
pytest ==3.8.2
4+
mock ==2.0.0

0 commit comments

Comments
 (0)