From b60b33bf2a7c58d1c0b80df93efa6bc3cfef0aa5 Mon Sep 17 00:00:00 2001 From: Max Chesterfield Date: Wed, 20 Aug 2025 16:08:03 +1000 Subject: [PATCH 1/3] update build system Signed-off-by: Max Chesterfield --- pyproject.toml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 30 ++------------------------- tox.ini | 18 +++++++++-------- 3 files changed, 67 insertions(+), 36 deletions(-) create mode 100644 pyproject.toml 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..0b8b5ce 100644 --- a/tox.ini +++ b/tox.ini @@ -1,17 +1,19 @@ [tox] -envlist = py39 +envlist = + py{310, 311, 312, 313} + build [testenv] -allowlist_externals = /bin/bash - /usr/bin/bash passenv = GITHUB_* pip_pre = true -deps = - .[test] +extras = test +depends = build: py{310, 311, 312, 313} +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 From 7737cbfb8b06e0bca178f8e5bdc944ce709972ee Mon Sep 17 00:00:00 2001 From: Max Chesterfield Date: Thu, 21 Aug 2025 09:54:10 +1000 Subject: [PATCH 2/3] pip list on build just incase theres a wrong version pulled Signed-off-by: Max Chesterfield --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 0b8b5ce..a83c07f 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,7 @@ commands = pytest --cov=zepben.eas --cov-report=xml --cov-branch [testenv:build] commands = + pip list python -m pip install build python -m build From 8e7f040a84ad652d48f676a29bef10399d30543d Mon Sep 17 00:00:00 2001 From: Max Chesterfield Date: Thu, 21 Aug 2025 10:39:49 +1000 Subject: [PATCH 3/3] workflow broken on 3.13 Signed-off-by: Max Chesterfield --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index a83c07f..4db1546 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,13 @@ [tox] envlist = - py{310, 311, 312, 313} + py{3.10, 3.11, 3.12} build [testenv] passenv = GITHUB_* pip_pre = true extras = test -depends = build: py{310, 311, 312, 313} +depends = build: py{3.10, 3.11, 3.12} commands = pytest --cov=zepben.eas --cov-report=xml --cov-branch [testenv:build]