diff --git a/.gitignore b/.gitignore index 25f71b9..cbe9109 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ build/ dist/ htmlcov/ pytest_datafiles.egg-info/ +poetry.lock + diff --git a/.travis.yml b/.travis.yml index 7097c44..c6368e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: python python: - 2.7 - - 3.4 - 3.5 - 3.6 - pypy @@ -11,11 +10,12 @@ python: install: - pip install --upgrade pip - pip install --upgrade pytest - - pip install coveralls + - pip install poetry script: - - python setup.py develop - - coverage run --source=pytest_datafiles runtests.py + - poetry install + - poetry add coveralls + - poetry run coverage run --source=pytest_datafiles runtests.py after_success: - - coveralls + - poetry run coveralls diff --git a/Makefile b/Makefile index d14ef76..3d73b30 100644 --- a/Makefile +++ b/Makefile @@ -31,20 +31,25 @@ clean-test: rm -f .coverage rm -fr htmlcov/ -lint: - tox -e lint +install: + @poetry install -test: - tox -e py35 +lint: install + @poetry run pylint pytest_datafiles.py + +test: install + @poetry run pytest test-all: - tox + @poetry run tox -coverage: - tox -e coverage - xdg-open htmlcov/index.html +coverage: install + @poetry run pytest \ + --cov-config .coveragerc \ + --cov-report html \ + --cov=pytest_datafiles \ + tests dist: clean - python setup.py sdist - python setup.py bdist_wheel - ls -l dist + @poetry build + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7ea896c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,39 @@ +[tool.poetry] +name = "pytest-datafiles" +version = "2.0.0" +description = "py.test plugin to create a 'tmpdir' containing predefined files/directories." +authors = ["Omar Kohl "] +license = "MIT" + +[tool.poetry.dependencies] +python = "~2.7 || ^3.5" +pytest = "^3.6" + +[tool.poetry.dev-dependencies] +autopep8 = "*" +codecov = "*" +flake8 = "*" +pylint = "*" +pytest-cov = "*" +setuptools = "*" +tox = "*" +twine = "*" +wheel = "*" + +[tool.tox] +legacy_tox_ini = """ +[tox] +isolated_build = True +envlist = py35,py36,py37 + +[testenv] +whitelist_externals = poetry +commands = + poetry install -vvv + poetry run pytest +""" + +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" +