diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..92010e5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +# Copyright 2025 Zeppelin Bend Pty Ltd +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +[build-system] +requires = [ + "setuptools", + "wheel", + "build>=1.2.0" +] +build-backend = "setuptools.build_meta" + +[project] +name = "zepben.eas" +version = "0.23.0b1" +description = "Python SDK for interacting with the Evolve App Server" +readme = {file = "README.md", content-type = "test/markdown"} +license = "MPL-2.0" +requires-python = '>=3.10' +authors = [ + {name = "Ramon Bouckaert", email = "ramon.bouckaert@zepben.com"}, + {name = "Max Chesterfield", email = "max.chesterfield@zepben.com"} +] +dependencies = [ + "geojson==2.5.0", + "requests<3.0.0,>=2.26.0", + "urllib3==1.26.6", + "zepben.auth==0.12.1", + "aiohttp[speedups]==3.9.0", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Operating System :: OS Independent" +] + +[project.urls] +Repository = "https://github.com/zepben/eas-python-client" +Homepage = "https://zepben.com" + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-cov", + "pytest-httpserver==1.0.8", + "trustme==0.9.0" +] + +[tool.setuptools.packages.find] +where = ["src/"] diff --git a/setup.py b/setup.py index 1197153..352f6fc 100644 --- a/setup.py +++ b/setup.py @@ -4,32 +4,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -from setuptools import setup, find_namespace_packages +import setuptools -with open("README.md", "r") as fh: - long_description = fh.read() - -test_deps = ["pytest", "pytest-cov", "pytest-httpserver==1.0.8", "trustme==0.9.0"] -setup( - name="zepben.eas", - version="0.23.0b1", - description="Python SDK for interacting with the Evolve App Server", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/zepben/eas-python-client", - author="Ramon Bouckaert", - author_email="ramon.bouckaert@zepben.com", - package_dir={"": "src"}, - python_requires='>=3.9', - packages=find_namespace_packages(where="src"), - install_requires=[ - "geojson==2.5.0", - "requests<3.0.0,>=2.26.0", - "urllib3==1.26.6", - "zepben.auth==0.12.1", - "aiohttp[speedups]==3.9.0", - ], - extras_require={ - "test": test_deps, - } -) +setuptools.setup() diff --git a/tox.ini b/tox.ini index 8898355..4db1546 100644 --- a/tox.ini +++ b/tox.ini @@ -1,17 +1,20 @@ [tox] -envlist = py39 +envlist = + py{3.10, 3.11, 3.12} + build [testenv] -allowlist_externals = /bin/bash - /usr/bin/bash passenv = GITHUB_* pip_pre = true -deps = - .[test] +extras = test +depends = build: py{3.10, 3.11, 3.12} +commands = pytest --cov=zepben.eas --cov-report=xml --cov-branch + +[testenv:build] commands = pip list - pytest --cov=zepben.eas --cov-report=xml --cov-branch - python setup.py bdist_wheel + python -m pip install build + python -m build [pytest] log_file_level = DEBUG