From f9e42743f3a824b1c40a7567101d21dd718909a5 Mon Sep 17 00:00:00 2001 From: Darren Weber Date: Mon, 3 Jun 2019 11:45:14 -0700 Subject: [PATCH 1/4] poetry create pyproject.toml --- pyproject.toml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1d06795 --- /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 = "^3.4" +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 = py34,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" + From 3b7a25976d18b53e7dc32ee063758d4a752158c4 Mon Sep 17 00:00:00 2001 From: Darren Weber Date: Mon, 3 Jun 2019 12:23:11 -0700 Subject: [PATCH 2/4] Ignore poetry.lock file --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) 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 + From 95138199bd2bd5b9e054a81e99dd4f9cef6d2221 Mon Sep 17 00:00:00 2001 From: Darren Weber Date: Mon, 3 Jun 2019 12:24:34 -0700 Subject: [PATCH 3/4] Use poetry tasks use poetry tasks for: - make rules - travis-CI builds --- .travis.yml | 9 +++++---- Makefile | 27 ++++++++++++++++----------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7097c44..9b7de8c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,11 +11,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 + From 6166c9b6a1db384bc59139e130598a200173f96c Mon Sep 17 00:00:00 2001 From: Darren Weber Date: Mon, 3 Jun 2019 13:32:04 -0700 Subject: [PATCH 4/4] Allow python 2.7, ^3.5 - update pyproject.toml - update travis-CI --- .travis.yml | 1 - pyproject.toml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b7de8c..c6368e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: python python: - 2.7 - - 3.4 - 3.5 - 3.6 - pypy diff --git a/pyproject.toml b/pyproject.toml index 1d06795..7ea896c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Omar Kohl "] license = "MIT" [tool.poetry.dependencies] -python = "^3.4" +python = "~2.7 || ^3.5" pytest = "^3.6" [tool.poetry.dev-dependencies] @@ -24,7 +24,7 @@ wheel = "*" legacy_tox_ini = """ [tox] isolated_build = True -envlist = py34,py35,py36,py37 +envlist = py35,py36,py37 [testenv] whitelist_externals = poetry