This is an automated email from the ASF dual-hosted git repository.
jgemignani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/age.git
The following commit(s) were added to refs/heads/master by this push:
new 838926cc Migrate python driver configuration to pyproject.toml (#2272)
838926cc is described below
commit 838926cc35ae64d3514c656959b749719e904b09
Author: Muhammad Taha Naveed <[email protected]>
AuthorDate: Thu Dec 11 21:51:12 2025 +0500
Migrate python driver configuration to pyproject.toml (#2272)
- Add pyproject.toml with package configuration
- Simplify setup.py to minimal backward-compatible wrapper.
- Updated CI workflow and .gitignore.
- Resolves warning about using setup.py directly.
---
.github/workflows/python-driver.yaml | 4 +--
.gitignore | 2 ++
drivers/python/README.md | 2 +-
drivers/python/pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++
drivers/python/setup.py | 28 ++++-----------------
5 files changed, 58 insertions(+), 26 deletions(-)
diff --git a/.github/workflows/python-driver.yaml
b/.github/workflows/python-driver.yaml
index 099b5c87..4dad1463 100644
--- a/.github/workflows/python-driver.yaml
+++ b/.github/workflows/python-driver.yaml
@@ -24,7 +24,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v4
with:
- python-version: '3.10'
+ python-version: '3.12'
- name: Install pre-requisites
run: |
@@ -33,7 +33,7 @@ jobs:
- name: Build
run: |
- python setup.py install
+ pip install .
- name: Test
run: |
diff --git a/.gitignore b/.gitignore
index a8e809dd..03923b03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,5 +11,7 @@ age--*.*.*.sql
!age--*--*sql
__pycache__
**/__pycache__
+**/.venv
+**/apache_age_python.egg-info
drivers/python/build
diff --git a/drivers/python/README.md b/drivers/python/README.md
index 18465227..749b44bf 100644
--- a/drivers/python/README.md
+++ b/drivers/python/README.md
@@ -62,7 +62,7 @@ python -m unittest -v test_agtypes.py
### Build from source
```
-python setup.py install
+pip install .
```
### For more information about [Apache AGE](https://age.apache.org/)
diff --git a/drivers/python/pyproject.toml b/drivers/python/pyproject.toml
new file mode 100644
index 00000000..18112381
--- /dev/null
+++ b/drivers/python/pyproject.toml
@@ -0,0 +1,48 @@
+# 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>=61.0", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "apache-age-python"
+version = "0.0.7"
+description = "Python driver support for Apache AGE"
+readme = "README.md"
+requires-python = ">=3.9"
+license = "Apache-2.0"
+keywords = ["Graph Database", "Apache AGE", "PostgreSQL"]
+authors = [
+ {name = "Ikchan Kwon, Apache AGE", email = "[email protected]"}
+]
+classifiers = [
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
+ "Programming Language :: Python :: 3.14",
+]
+dependencies = [
+ "psycopg",
+ "antlr4-python3-runtime==4.11.1",
+]
+
+[project.urls]
+Homepage = "https://github.com/apache/age/tree/master/drivers/python"
+Download = "https://github.com/apache/age/releases"
+
+[tool.setuptools]
+packages = ["age", "age.gen", "age.networkx"]
diff --git a/drivers/python/setup.py b/drivers/python/setup.py
index 1da49d9c..d0eed26b 100644
--- a/drivers/python/setup.py
+++ b/drivers/python/setup.py
@@ -13,28 +13,10 @@
# specific language governing permissions and limitations
# under the License.
-from setuptools import setup, find_packages
-from age import VERSION
+# This setup.py is maintained for backward compatibility.
+# All package configuration is in pyproject.toml. For installation,
+# use: pip install .
-with open("README.md", "r", encoding='utf8') as fh:
- long_description = fh.read()
+from setuptools import setup
-setup(
- name = 'apache-age-python',
- version = '0.0.7',
- description = 'Python driver support for Apache AGE',
- long_description=long_description,
- long_description_content_type="text/markdown",
- author = 'Ikchan Kwon, Apache AGE',
- author_email = '[email protected]',
- url =
'https://github.com/apache/age/tree/master/drivers/python',
- download_url = 'https://github.com/apache/age/releases' ,
- license = 'Apache2.0',
- install_requires = [ 'psycopg', 'antlr4-python3-runtime==4.11.1'],
- packages = ['age', 'age.gen','age.networkx'],
- keywords = ['Graph Database', 'Apache AGE', 'PostgreSQL'],
- python_requires = '>=3.9',
- classifiers = [
- 'Programming Language :: Python :: 3.9'
- ]
-)
+setup()