details: https://code.tryton.org/contrib/flask-tryton/commit/247573820630
branch: default
user: Cédric Krier <[email protected]>
date: Thu Mar 19 09:42:19 2026 +0100
description:
Upgrade to pyproject using hatchling as build-system
diffstat:
.gitlab-ci.yml | 4 ++--
.hgignore | 7 +++++++
CHANGELOG | 1 +
COPYRIGHT | 6 +++---
MANIFEST.in | 4 ----
pyproject.toml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
setup.py | 56 --------------------------------------------------------
7 files changed, 59 insertions(+), 65 deletions(-)
diffs (165 lines):
diff -r 64a39a133736 -r 247573820630 .gitlab-ci.yml
--- a/.gitlab-ci.yml Wed Apr 09 19:50:03 2025 +0200
+++ b/.gitlab-ci.yml Thu Mar 19 09:42:19 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 64a39a133736 -r 247573820630 .hgignore
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Thu Mar 19 09:42:19 2026 +0100
@@ -0,0 +1,7 @@
+syntax: glob
+*.py[cdo]
+*.egg-info
+dist/
+build/
+.tox/
+.coverage
diff -r 64a39a133736 -r 247573820630 CHANGELOG
--- a/CHANGELOG Wed Apr 09 19:50:03 2025 +0200
+++ b/CHANGELOG Thu Mar 19 09:42:19 2026 +0100
@@ -1,3 +1,4 @@
+* Upgrade to pyproject
* Make transaction decorator reentrant
Version 0.12.2 - 2025-03-13
diff -r 64a39a133736 -r 247573820630 COPYRIGHT
--- a/COPYRIGHT Wed Apr 09 19:50:03 2025 +0200
+++ b/COPYRIGHT Thu Mar 19 09:42:19 2026 +0100
@@ -1,6 +1,6 @@
-Copyright (c) 2013-2025 Cédric Krier.
-Copyright (c) 2013-2025 B2CK.
-Copyright (c) 2020 Sergi Almacellas Abellana.
+Copyright (c) 2013-2025 Cédric Krier <[email protected]>
+Copyright (c) 2013-2025 B2CK SRL
+Copyright (c) 2020 Sergi Almacellas Abellana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff -r 64a39a133736 -r 247573820630 MANIFEST.in
--- a/MANIFEST.in Wed Apr 09 19:50:03 2025 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-include CHANGELOG
-include COPYRIGHT
-include LICENSE
-include README
diff -r 64a39a133736 -r 247573820630 pyproject.toml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml Thu Mar 19 09:42:19 2026 +0100
@@ -0,0 +1,46 @@
+[build-system]
+requires = ['hatchling >= 1', 'hatch-tryton']
+build-backend = 'hatchling.build'
+
+[project]
+name = 'flask_tryton'
+dynamic = ['version', 'authors']
+dependencies = [
+ 'Flask>=0.8',
+ 'Werkzeug',
+ 'trytond>=6.0',
+ ]
+requires-python= '>=3.6'
+maintainers = [
+ {name = "Cédric Krier", email = "[email protected]"},
+ ]
+description = "Adds Tryton support to Flask application"
+readme = 'README.rst'
+license = 'GPL-3.0-or-later'
+license-files = ['LICENSE', 'COPYRIGHT']
+keywords = ["tryton", "flask", "web"]
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: Web Environment",
+ "Framework :: Tryton",
+ "Framework :: Flask",
+ "Intended Audience :: Developers",
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ]
+
+[project.urls]
+homepage = "https://www.tryton.org/"
+changelog =
"https://code.tryton.org/contrib/flask-tryton/-/blob/branch/default/CHANGELOG"
+forum = "https://discuss.tryton.org/tags/flask"
+issues = "https://bugs.tryton.org/flask-tryton"
+repository = "https://code.tryton.org/contrib/flask-tryton"
+
+[tool.hatch.version]
+path = 'flask_tryton.py'
+
+[tool.hatch.build]
+include = ['flask_tryton.py']
+
+[tool.hatch.metadata.hooks.tryton]
+copyright = 'COPYRIGHT'
diff -r 64a39a133736 -r 247573820630 setup.py
--- a/setup.py Wed Apr 09 19:50:03 2025 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-# This file is part of flask_tryton. The COPYRIGHT file at the top level of
-# this repository contains the full copyright notices and license terms.
-import io
-import os
-import re
-
-from setuptools import setup
-
-
-def read(fname):
- return io.open(
- os.path.join(os.path.dirname(__file__), fname),
- 'r', encoding='utf-8').read()
-
-
-def get_version():
- init = read('flask_tryton.py')
- return re.search("__version__ = '([0-9.]*)'", init).group(1)
-
-
-setup(name='flask_tryton',
- version=get_version(),
- description='Adds Tryton support to Flask application',
- long_description=read('README.rst'),
- author='Tryton',
- author_email='[email protected]',
- url='https://pypi.org/project/flask-tryton/',
- download_url='https://downloads.tryton.org/flask-tryton/',
- project_urls={
- "Bug Tracker": 'https://bugs.tryton.org/flask-tryton',
- "Forum": 'https://discuss.tryton.org/tags/flask',
- "Source Code": 'https://code.tryton.org/flask-tryton',
- },
- py_modules=['flask_tryton'],
- zip_safe=False,
- platforms='any',
- keywords='flask tryton web',
- classifiers=[
- 'Environment :: Web Environment',
- 'Framework :: Tryton',
- 'Framework :: Flask',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: GNU General Public License (GPL)',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python :: 3',
- 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
- 'Topic :: Software Development :: Libraries :: Python Modules'
- ],
- license='GPL-3',
- python_requires='>=3.6',
- install_requires=[
- 'Flask>=0.8',
- 'Werkzeug',
- 'trytond>=6.0',
- ],
- )