diff --git a/.drone.jsonnet b/.drone.jsonnet index 9e1df48..3deff4c 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -6,8 +6,9 @@ local Pipeline(py_version) = { name: "test", image: "python:" + py_version, commands: [ - "pip install .[tests]", - "pytest" + "pip install poetry", + "poetry install -v", + "poetry run pytest" ] } ] diff --git a/.gitignore b/.gitignore index cd4dcb4..cc8e0e3 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ coverage.xml # Virtualenv venv/ + +# Poetry +poetry.lock diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1ca3591 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" + +[tool] +[tool.poetry] +name = "apns2" +version = "0.7.1" +description = "A python library for interacting with the Apple Push Notification Service via HTTP/2 protocol" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries" +] +authors = ["Sergey Petrov "] + +[tool.poetry.dependencies] +python = ">=3.5" +cryptography = ">=1.7.2" +hyper = ">=0.7" +pyjwt = ">=1.4.0" + +[tool.poetry.dev-dependencies] +pytest = "*" +freezegun = "*" diff --git a/tox.ini b/tox.ini index 7526f03..4d0547e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,7 @@ envlist = py35, py36, py37, py38 [testenv] -commands = pytest {posargs} - -extras = tests - -usedevelop=True +whitelist_externals = poetry +commands = + poetry install -v + poetry run pytest {posargs}