Skip to content

Commit fbe659a

Browse files
committed
BREAK: remove 2.7 support; remove docker; use travis python
1 parent 40fff2d commit fbe659a

8 files changed

+33
-41
lines changed

.travis.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: python
2-
sudo: required
3-
services:
4-
- docker
5-
script:
6-
- make docker/build
7-
before_install:
8-
- pip install codecov
2+
python:
3+
- "3.6"
4+
- "3.7"
5+
- "3.8"
6+
script: tox
7+
install:
8+
- pip install codecov tox-travis
99
after_success:
1010
- codecov
1111
deploy:

Dockerfile

-5
This file was deleted.

Makefile

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# This Makefile requires the following commands to be available:
22
# * python3.6
3-
# * docker
4-
# * docker-compose
53

64
DEPS:=requirements.txt
7-
DOCKER_COMPOSE:=$(shell which docker-compose)
85

96
PIP:="venv/bin/pip"
107
CMD_FROM_VENV:=". venv/bin/activate; which"
@@ -31,7 +28,7 @@ venv:
3128
@python3.6 -m venv venv
3229
@$(PIP) install -U "pip>=7.0" -q
3330
@$(PIP) install -U setuptools -q
34-
@$(PIP) install --use-feature=2020-resolver -r $(DEPS)
31+
@$(PIP) install -r $(DEPS)
3532

3633
test: venv pyclean
3734
$(TOX) -e $(TOX_PY_LIST)
@@ -42,21 +39,18 @@ test/%: venv pyclean
4239
lint: venv
4340
@$(TOX) -e isort-check
4441
@$(TOX) -e flake8
42+
@$(TOX) -e black
4543

4644
isort: venv
4745
@$(TOX) -e isort-fix
4846

49-
docker:
50-
$(DOCKER_COMPOSE) run --rm --service-ports app bash
51-
52-
docker/%:
53-
$(DOCKER_COMPOSE) run --rm --service-ports app make $*
54-
5547
## Distribution
56-
build: venv tox
48+
.PHONY: build
49+
build: venv
5750
-rm -rf dist build
5851
$(PYTHON) setup.py sdist bdist_wheel
5952
$(TWINE) check dist/*
6053

54+
.PHONY: publish
6155
publish: build
6256
$(TWINE) upload dist/*

docker-compose.yml

-5
This file was deleted.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.black]
22
line-length = 120
3-
target_version = ["py27", "py35", "py36", "py37"]
3+
target_version = ["py36", "py37", "py38"]
44

55
[tool.isort]
66
combine_as_imports = true

requirements.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Package in develop mode
22
-e .
33

4-
importlib-metadata
4+
# Latest tox (3.20.1 at the moment) requires importlib-metadata<3,>=0.12
5+
importlib-metadata<3
56

67
# Distribution
78
twine
@@ -11,9 +12,10 @@ wheel
1112
mypy; python_version >= '3.5'
1213
isort[pyproject]
1314
flake8
15+
black; python_version >= '3.6'
1416

1517
# Tests
16-
tox
18+
tox==3.20.1
1719
pytest
1820
pytest-cov
1921
pytest-asyncio; python_version >= '3.5'

setup.py

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
"Intended Audience :: Developers",
2727
"Operating System :: OS Independent",
2828
"Programming Language :: Python",
29-
"Programming Language :: Python :: 2",
30-
"Programming Language :: Python :: 2.7",
3129
"Programming Language :: Python :: 3",
3230
"Programming Language :: Python :: 3.5",
3331
"Programming Language :: Python :: 3.6",

tox.ini

+16-8
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,40 @@
22
addopts=--tb=short
33

44
[tox]
5-
envlist = isort-check,isort-fix,flake8,py27,py35,py36
5+
envlist = isort-check,isort-fix,flake8,black,py36,py37,py38,build-check
66

77
[testenv]
88
passenv = *
9-
install_command = pip install --use-feature=2020-resolver {opts} {packages}
9+
install_command = pip install {opts} {packages}
1010
commands =
1111
coverage run -m pytest tests {posargs}
1212
coverage xml -i -o coverage.{envname}.xml
1313
deps =
1414
-rrequirements.txt
1515

16-
[testenv:py27]
17-
setenv =
18-
PYTEST_ADDOPTS = --ignore tests/test_fqn_decorators_asynchronous.py
19-
deps =
20-
{[testenv]deps}
21-
2216
[testenv:flake8]
2317
basepython = python3.6
2418
commands = flake8 fqn_decorators tests setup.py --exclude=fqn_decorators/__init__.py
2519
deps = flake8
2620

21+
[testenv:black]
22+
basepython = python3.6
23+
commands = black fqn_decorators tests setup.py --exclude=fqn_decorators/__init__.py
24+
deps = black
25+
2726
[testenv:isort-check]
2827
commands = isort -c fqn_decorators tests setup.py
2928
deps = isort
3029

3130
[testenv:isort-fix]
3231
commands = isort fqn_decorators tests setup.py
3332
deps = isort
33+
34+
[testenv:build-check]
35+
basepython = python3.6
36+
commands =
37+
rm -rf dist build
38+
python setup.py sdist bdist_wheel
39+
twine check dist/*
40+
deps = twine
41+
allowlist_externals = /bin/rm

0 commit comments

Comments
 (0)