details:   https://code.tryton.org/python-sql/commit/9b36c1048a5d
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Mar 16 14:28:21 2026 +0100
description:
        Upgrade to pyproject using hatchling as build-system
diffstat:

 .gitlab-ci.yml |   4 ++--
 .hgignore      |   7 +++++++
 CHANGELOG      |   1 +
 COPYRIGHT      |   6 +++---
 MANIFEST.in    |   3 ---
 pyproject.toml |  38 ++++++++++++++++++++++++++++++++++++++
 setup.py       |  56 --------------------------------------------------------
 7 files changed, 51 insertions(+), 64 deletions(-)

diffs (156 lines):

diff -r c42894817c35 -r 9b36c1048a5d .gitlab-ci.yml
--- a/.gitlab-ci.yml    Sat Jan 24 09:06:14 2026 +0100
+++ b/.gitlab-ci.yml    Mon Mar 16 14:28:21 2026 +0100
@@ -25,9 +25,9 @@
 check-dist:
   extends: .check
   before_script:
-    - pip install twine
+    - pip install build twine
   script:
-    - python setup.py sdist
+    - pyproject-build
     - twine check dist/*
 
 .test:
diff -r c42894817c35 -r 9b36c1048a5d .hgignore
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Mon Mar 16 14:28:21 2026 +0100
@@ -0,0 +1,7 @@
+syntax: glob
+*.py[cdo]
+*.egg-info
+dist/
+build/
+.tox/
+.coverage
diff -r c42894817c35 -r 9b36c1048a5d CHANGELOG
--- a/CHANGELOG Sat Jan 24 09:06:14 2026 +0100
+++ b/CHANGELOG Mon Mar 16 14:28:21 2026 +0100
@@ -1,3 +1,4 @@
+* Upgrade to pyproject
 * Add support for array operators
 * Remove the parentheses around the unary and binary operators
 * Use the ordinal number as aliases for GROUP BY
diff -r c42894817c35 -r 9b36c1048a5d COPYRIGHT
--- a/COPYRIGHT Sat Jan 24 09:06:14 2026 +0100
+++ b/COPYRIGHT Mon Mar 16 14:28:21 2026 +0100
@@ -1,6 +1,6 @@
-Copyright (c) 2011-2025, Cédric Krier
-Copyright (c) 2013-2025, Nicolas Évrard
-Copyright (c) 2011-2025, B2CK
+Copyright (c) 2011-2025 Cédric Krier <[email protected]>
+Copyright (c) 2013-2025 Nicolas Évrard <[email protected]>
+Copyright (c) 2011-2025 B2CK SRL
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -r c42894817c35 -r 9b36c1048a5d MANIFEST.in
--- a/MANIFEST.in       Sat Jan 24 09:06:14 2026 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-include COPYRIGHT
-include README.rst
-include CHANGELOG
diff -r c42894817c35 -r 9b36c1048a5d pyproject.toml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml    Mon Mar 16 14:28:21 2026 +0100
@@ -0,0 +1,38 @@
+[build-system]
+requires = ['hatchling >= 1', 'hatch-tryton']
+build-backend = 'hatchling.build'
+
+[project]
+name = 'python-sql'
+dynamic = ['version', 'authors']
+requires-python = '>=3.6'
+maintainers = [
+    {name = "Tryton", email = "[email protected]"},
+    ]
+description = "Library to write SQL queries"
+readme = 'README.rst'
+license = 'BSD-3-Clause'
+license-files = ['COPYRIGHT']
+keywords = ["SQL", "database", "query"]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Intended Audience :: Developers",
+    "Topic :: Database",
+    "Topic :: Software Development :: Libraries :: Python Modules",
+    ]
+
+[project.urls]
+homepage = "https://www.tryton.org/";
+changelog = 
"https://code.tryton.org/python-sql/-/blob/branch/default/CHANGELOG";
+forum = "https://discuss.tryton.org/tags/python-sql";
+issues = "https://bugs.tryton.org/python-sql";
+repository = "https://code.tryton.org/python-sql";
+
+[tool.hatch.version]
+path = 'sql/__init__.py'
+
+[tool.hatch.build]
+packages = ['sql']
+
+[tool.hatch.metadata.hooks.tryton]
+copyright = 'COPYRIGHT'
diff -r c42894817c35 -r 9b36c1048a5d setup.py
--- a/setup.py  Sat Jan 24 09:06:14 2026 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-# This file is part of python-sql.  The COPYRIGHT file at the top level of
-# this repository contains the full copyright notices and license terms.
-import codecs
-import os
-import re
-
-from setuptools import find_packages, setup
-
-
-def read(fname):
-    return codecs.open(
-        os.path.join(os.path.dirname(__file__), fname), 'r', 'utf-8').read()
-
-
-def get_version():
-    init = read(os.path.join('sql', '__init__.py'))
-    return re.search("__version__ = '([0-9.]*)'", init).group(1)
-
-
-setup(name='python-sql',
-    version=get_version(),
-    description='Library to write SQL queries',
-    long_description=read('README.rst'),
-    author='Tryton',
-    author_email='[email protected]',
-    url='https://pypi.org/project/python-sql/',
-    download_url='https://downloads.tryton.org/python-sql/',
-    project_urls={
-        "Bug Tracker": 'https://bugs.tryton.org/python-sql',
-        "Forum": 'https://discuss.tryton.org/tags/python-sql',
-        "Source Code": 'https://code.tryton.org/python-sql',
-        },
-    keywords='SQL database query',
-    packages=find_packages(),
-    python_requires='>=3.6',
-    classifiers=[
-        'Development Status :: 5 - Production/Stable',
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: BSD License',
-        'Operating System :: OS Independent',
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.6',
-        'Programming Language :: Python :: 3.7',
-        'Programming Language :: Python :: 3.8',
-        'Programming Language :: Python :: 3.9',
-        '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',
-        'Topic :: Database',
-        'Topic :: Software Development :: Libraries :: Python Modules',
-        ],
-    license='BSD',
-    )

Reply via email to