From 9da4b05b0369110fc6ad7ea7a2096d94dcfa7a04 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 4 Nov 2024 09:21:44 -0500 Subject: [PATCH 01/11] apply PEP621 --- pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++ setup.cfg | 22 ---------------------- 2 files changed, 37 insertions(+), 22 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 4cdb773f..fe43f6b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,26 @@ +[project] +name = "s2geometry" +version = "0.11.0.dev1" +description = "Python packaging of s2geometry" +authors = [ + { name = "Brian Miles", email = "selimnairb@gmail.com" }, +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: POSIX", + "License :: OSI Approved :: Apache Software License", +] +dynamic = [ + "version", +] + +[project.license] +file = "LICENSE" +content-type = "text/plain" + +[project.urls] +Source = "https://github.com/google/s2geometry" + [build-system] requires = [ "wheel", @@ -6,3 +29,17 @@ requires = [ "cmake_build_extension", ] build-backend = "setuptools.build_meta" + +[tool.setuptools] +zip-safe = false +include-package-data = false +python-requres = ">=3.7" + +[tool.setuptools.packages.find] +where = [ + "src", +] +namespaces = false + +[tool.setuptools.package-dir] +"" = "src" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index cc87371b..00000000 --- a/setup.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[metadata] -name = s2geometry -version = 0.11.0.dev1 -description = Python packaging of s2geometry -author = Brian Miles -author_email = selimnairb@gmail.com -license= Apache 2 -project_urls = - Source = https://github.com/google/s2geometry -classifiers = - Programming Language :: Python :: 3 - Operating System :: POSIX - License :: OSI Approved :: Apache Software License - -[options] -zip_safe = False -packages = find: -package_dir = =src -python_requres = >=3.7 - -[options.packages.find] -where = src From 43115964978536ea12d2a3f89ff9341d9988471e Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 4 Nov 2024 09:27:26 -0500 Subject: [PATCH 02/11] add to contributors --- CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d29034bf..10eb580c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -30,3 +30,4 @@ Mike Playle Phil Elson Robert Coup Tiago Brito +Zachary Burnett From d5fcc57da8efa8c14d2998d3e4f07b1afd424846 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Mon, 4 Nov 2024 09:32:02 -0500 Subject: [PATCH 03/11] don't need to hardcode the version --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fe43f6b7..51891a5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [project] name = "s2geometry" -version = "0.11.0.dev1" description = "Python packaging of s2geometry" authors = [ { name = "Brian Miles", email = "selimnairb@gmail.com" }, From 4c209bcb604b8ab905879567b5084611c71b9915 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Mon, 4 Nov 2024 09:32:14 -0500 Subject: [PATCH 04/11] use description from github repo --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 51891a5b..5985828c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "s2geometry" -description = "Python packaging of s2geometry" +description = "Computational geometry and spatial indexing on the sphere" authors = [ { name = "Brian Miles", email = "selimnairb@gmail.com" }, ] From bd99dd6e0de245eef26d0d3ee3b0d44413502b72 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Mon, 4 Nov 2024 09:32:34 -0500 Subject: [PATCH 05/11] move Python version to `project.requires-python` --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5985828c..43e639ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,7 @@ description = "Computational geometry and spatial indexing on the sphere" authors = [ { name = "Brian Miles", email = "selimnairb@gmail.com" }, ] +requires-python = ">=3.7" classifiers = [ "Programming Language :: Python :: 3", "Operating System :: POSIX", @@ -32,7 +33,6 @@ build-backend = "setuptools.build_meta" [tool.setuptools] zip-safe = false include-package-data = false -python-requres = ">=3.7" [tool.setuptools.packages.find] where = [ From 1cca9c0b37ed169e6282e965298d10bce3f16520 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 4 Nov 2024 09:47:25 -0500 Subject: [PATCH 06/11] add test extra and pytest config --- pyproject.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 43e639ce..7295b2e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,11 @@ content-type = "text/plain" [project.urls] Source = "https://github.com/google/s2geometry" +[project.optional-dependencies] +test = [ + "pytest", +] + [build-system] requires = [ "wheel", @@ -42,3 +47,8 @@ namespaces = false [tool.setuptools.package-dir] "" = "src" + +# [tool.pytest.ini-options] +# testpaths = [ +# "src/python/", +# ] From 33c5eb5989314b378615a046c50f6b9aaeea11b3 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 4 Nov 2024 09:47:41 -0500 Subject: [PATCH 07/11] update wheel building instructions --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c757fc7d..aa17c583 100644 --- a/README.md +++ b/README.md @@ -205,23 +205,22 @@ even 2.0. Python 3 is required. ### Creating wheels -First, make a virtual environment and install `cmake_build_extension` and `wheel` -into it: +First, make a virtual environment and install `build` into it: ``` python3 -m venv venv source venv/bin/activate -pip install cmake_build_extension wheel +pip install build ``` Then build the wheel: ``` -python setup.py bdist_wheel +python -m build ``` The resulting wheel will be in the `dist` directory. -> If OpenSSL is in a non-standard location make sure to set `OPENSSL_ROOT_DIR` -> when calling `setup.py`, see above for more information. +> If OpenSSL is in a non-standard location make sure to set `OPENSSL_ROOT_DIR`; +> see above for more information. ## Other S2 implementations From 24b1852f10959b39832dbc1da30fe7323eb6d45a Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 4 Nov 2024 12:41:58 -0500 Subject: [PATCH 08/11] use authors from AUTHORS --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7295b2e1..33b38d65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,11 @@ name = "s2geometry" description = "Computational geometry and spatial indexing on the sphere" authors = [ - { name = "Brian Miles", email = "selimnairb@gmail.com" }, + { name = "Dan Larkin-York", email = "dan@arangodb.com" }, + { name = "Google Inc."}, + { name = "Koordinates Limited"}, + { name = "Mike Playle", email = "mike@mythik.co.uk" }, + { name = "Tiago Brito", email = "tiago.brito@90poe.io" }, ] requires-python = ">=3.7" classifiers = [ From 81432908aa75c8916d1f290e0f43a4ecac119098 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 4 Nov 2024 12:43:32 -0500 Subject: [PATCH 09/11] add space --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 33b38d65..a8f51c86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,8 @@ name = "s2geometry" description = "Computational geometry and spatial indexing on the sphere" authors = [ { name = "Dan Larkin-York", email = "dan@arangodb.com" }, - { name = "Google Inc."}, - { name = "Koordinates Limited"}, + { name = "Google Inc." }, + { name = "Koordinates Limited" }, { name = "Mike Playle", email = "mike@mythik.co.uk" }, { name = "Tiago Brito", email = "tiago.brito@90poe.io" }, ] From cbdc0d4f0429e1a30256fe5752a0c1b34d1ad9b3 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Mon, 4 Nov 2024 13:56:36 -0500 Subject: [PATCH 10/11] remove commented code --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a8f51c86..fc6bb3dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,3 @@ namespaces = false [tool.setuptools.package-dir] "" = "src" -# [tool.pytest.ini-options] -# testpaths = [ -# "src/python/", -# ] From 31c46e6cddef272aee774ae8f95db4137339c485 Mon Sep 17 00:00:00 2001 From: Jesse Rosenstock Date: Thu, 7 Nov 2024 06:25:02 -0500 Subject: [PATCH 11/11] pyproject.toml: Use CONTRIBUTORS as authors Co-authored-by: Zach Burnett --- pyproject.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fc6bb3dc..6a55b8c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,10 +3,14 @@ name = "s2geometry" description = "Computational geometry and spatial indexing on the sphere" authors = [ { name = "Dan Larkin-York", email = "dan@arangodb.com" }, - { name = "Google Inc." }, - { name = "Koordinates Limited" }, + { name = "Eric Veach", email = "ericv@google.com" }, + { name = "Jesse Rosenstock", email = "jmr@google.com" }, + { name = "Julien Basch", email = "julienbasch@google.com" }, { name = "Mike Playle", email = "mike@mythik.co.uk" }, + { name = "Phil Elson", email = "pelson.pub@gmail.com" }, + { name = "Robert Coup", email = "robert.coup@koordinates.com" }, { name = "Tiago Brito", email = "tiago.brito@90poe.io" }, + { name = "Zachary Burnett", email = "zachary.r.burnett@gmail.com" }, ] requires-python = ">=3.7" classifiers = [