This is an automated email from the ASF dual-hosted git repository.
kenhuuu pushed a commit to branch TINKERPOP-3199
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/TINKERPOP-3199 by this push:
new 5c954c1980 TINKERPOP-3199 Updated build system to work with
setuptools>=60
5c954c1980 is described below
commit 5c954c1980e0f77ebcda305306db1163bd1e3ad3
Author: Ken Hu <[email protected]>
AuthorDate: Fri Oct 10 15:37:36 2025 -0700
TINKERPOP-3199 Updated build system to work with setuptools>=60
---
gremlin-python/docker-compose.yml | 8 +--
gremlin-python/src/main/python/pyproject.toml | 76 +++++++++++++++++++++++++++
gremlin-python/src/main/python/setup.cfg | 22 --------
3 files changed, 80 insertions(+), 26 deletions(-)
diff --git a/gremlin-python/docker-compose.yml
b/gremlin-python/docker-compose.yml
index 9b5172e519..816283de65 100644
--- a/gremlin-python/docker-compose.yml
+++ b/gremlin-python/docker-compose.yml
@@ -71,9 +71,9 @@ services:
&& echo 'password' | kinit stephen
&& klist
&& pip install wheel radish-bdd PyHamcrest aenum isodate kerberos
- && python3 ./setup.py build
- && python3 ./setup.py test
- && python3 ./setup.py install
+ && pip install -e .[test]
+ && pytest
+ && pip install .
&& radish -f dots -e -t -b ./radish ./gremlin-test
--user-data='serializer=application/vnd.gremlin-v3.0+json'
&& radish -f dots -e -t -b ./radish ./gremlin-test
--user-data='serializer=application/vnd.graphbinary-v1.0';
EXIT_CODE=$$?; chown -R `stat -c "%u:%g" .` .; exit $$EXIT_CODE"
@@ -90,7 +90,7 @@ services:
environment:
- VERSION=${VERSION}
command: >
- bash -c "python3 setup.py sdist bdist_wheel;
+ bash -c "pip install build && python -m build;
EXIT_CODE=$$?; chown -R `stat -c "%u:%g" .` .; exit $$EXIT_CODE"
gremlin-socket-server:
diff --git a/gremlin-python/src/main/python/pyproject.toml
b/gremlin-python/src/main/python/pyproject.toml
new file mode 100644
index 0000000000..584810ab9c
--- /dev/null
+++ b/gremlin-python/src/main/python/pyproject.toml
@@ -0,0 +1,76 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[build-system]
+requires = ["setuptools>=60", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "gremlinpython"
+dynamic = ["version"]
+description = "Gremlin-Python for Apache TinkerPop"
+readme = {file = "README.rst", content-type = "text/x-rst"}
+license = {text = "Apache 2"}
+maintainers = [{name = "Apache TinkerPop", email =
"[email protected]"}]
+requires-python = ">=3.9"
+dependencies = [
+ "nest_asyncio",
+ "aiohttp>=3.8.0,<4.0.0",
+ "aenum>=1.4.5,<4.0.0",
+ "isodate>=0.6.0,<1.0.0",
+ "async-timeout>=4.0.3,<5.0.0"
+]
+classifiers = [
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: Apache Software License",
+ "Natural Language :: English",
+ "Programming Language :: Python :: 3"
+]
+
+[project.urls]
+Homepage = "https://tinkerpop.apache.org"
+
+[project.optional-dependencies]
+kerberos = ["kerberos>=1.3.0,<2.0.0"]
+ujson = ["ujson>=2.0.0"]
+test = [
+ "pytest>=4.6.4,<7.2.0",
+ "radish-bdd==0.13.4",
+ "PyHamcrest>=1.9.0,<3.0.0",
+ "PyYAML>=5.3"
+]
+
+[tool.pytest.ini_options]
+addopts = "--junitxml=./python-reports/TEST-native-python.xml -sv"
+norecursedirs = [".*", "build", "dist", "CVS", "_darcs", "{arch}", "*.egg",
"lib", "lib64"]
+testpaths = ["tests"]
+
+[tool.setuptools.dynamic]
+version = {attr = "gremlin_python.__version__.version"}
+
+[tool.setuptools.package-data]
+"*" = ["LICENSE", "NOTICE"]
+
+[tool.setuptools]
+packages = [
+ "gremlin_python",
+ "gremlin_python.driver",
+ "gremlin_python.driver.aiohttp",
+ "gremlin_python.process",
+ "gremlin_python.structure",
+ "gremlin_python.structure.io"
+]
\ No newline at end of file
diff --git a/gremlin-python/src/main/python/setup.cfg
b/gremlin-python/src/main/python/setup.cfg
deleted file mode 100644
index d63f2e1510..0000000000
--- a/gremlin-python/src/main/python/setup.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-[aliases]
-test=pytest
-
-[tool:pytest]
-addopts = --junitxml=./python-reports/TEST-native-python.xml -sv
-norecursedirs = '.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg' lib
lib64