Skip to content

Commit

Permalink
wip; fixed (i hope so) appveyor build and moved some commands from Ma…
Browse files Browse the repository at this point in the history
…kefile to tox
  • Loading branch information
vltr committed Jun 28, 2018
1 parent 10b9d58 commit 8ae13d7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 29 deletions.
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ help:
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

test:
pytest --cov --cov-report=term-missing -vv

black:
black ./src/middle/ -l 79 --safe
black ./tests/ -l 79 --safe

cleanpycache:
find . -type d | grep "__pycache__" | xargs rm -rf

Expand All @@ -44,5 +37,4 @@ requirements-dev:
release:
tox -e check
python setup.py clean --all sdist bdist_wheel
twine register dist/*
twine upload --skip-existing dist/*.whl dist/*.gz dist/*.zip
19 changes: 6 additions & 13 deletions ci/appveyor-bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
with various fixes and improvements that just weren't feasible to implement in PowerShell.
"""
from __future__ import print_function

from os import environ
from os.path import exists
from subprocess import check_call
Expand All @@ -18,23 +19,15 @@
GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
GET_PIP_PATH = "C:\get-pip.py"
URLS = {
("2.7", "64"): BASE_URL + "2.7.13/python-2.7.13.amd64.msi",
("2.7", "32"): BASE_URL + "2.7.13/python-2.7.13.msi",
("3.4", "64"): BASE_URL + "3.4.4/python-3.4.4.amd64.msi",
("3.4", "32"): BASE_URL + "3.4.4/python-3.4.4.msi",
("3.5", "64"): BASE_URL + "3.5.4/python-3.5.4-amd64.exe",
("3.5", "32"): BASE_URL + "3.5.4/python-3.5.4.exe",
("3.6", "64"): BASE_URL + "3.6.2/python-3.6.2-amd64.exe",
("3.6", "32"): BASE_URL + "3.6.2/python-3.6.2.exe",
("3.6", "64"): BASE_URL + "3.6.6/python-3.6.6-amd64.exe",
("3.6", "32"): BASE_URL + "3.6.6/python-3.6.6.exe",
("3.7", "64"): BASE_URL + "3.7.0/python-3.7.0-amd64.exe",
("3.7", "32"): BASE_URL + "3.7.0/python-3.7.0.exe",
}
INSTALL_CMD = {
# Commands are allowed to fail only if they are not the last command. Eg: uninstall (/x) allowed to fail.
"2.7": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.4": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.5": [["{path}", "/quiet", "TargetDir={home}"]],
"3.6": [["{path}", "/quiet", "TargetDir={home}"]],
"3.7": [["{path}", "/quiet", "TargetDir={home}"]],
}


Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.black]
line-length = 79
safe = true
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ addopts =
force_single_line = True
line_length = 79
known_first_party = middle
known_third_party = attr,pytest
default_section = THIRDPARTY
forced_separate = test_middle
not_skip = __init__.py
Expand Down
24 changes: 16 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ deps =
commands =
{posargs:pytest --cov --cov-report=term-missing -vv tests}

[testenv:bootstrap]
deps =
jinja2
matrix
skip_install = true
commands =
python ci/bootstrap.py
# [testenv:bootstrap]
# deps =
# jinja2
# matrix
# skip_install = true
# commands =
# python ci/bootstrap.py
[testenv:spell]
setenv =
SPELLCHECK=1
Expand All @@ -56,6 +56,14 @@ commands =
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs

[testenv:format]
basepython = python3.6
deps =
black
skip_install = true
commands =
black --verbose src tests setup.py

[testenv:check]
basepython = python3.6
deps =
Expand All @@ -72,7 +80,7 @@ commands =
check-manifest {toxinidir}
flake8 src tests setup.py
isort --verbose --check-only --diff --recursive src tests setup.py
black --verbose --check -l 79 --safe src tests setup.py
black --verbose --check src tests setup.py

[testenv:coveralls]
deps =
Expand Down

0 comments on commit 8ae13d7

Please sign in to comment.