details:   https://code.tryton.org/mt940/commit/67bcf3623e1d
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Mar 16 14:33:30 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 |  39 +++++++++++++++++++++++++++++++++++++
 setup.py       |  60 ----------------------------------------------------------
 7 files changed, 52 insertions(+), 69 deletions(-)

diffs (162 lines):

diff -r 4709b866f8dc -r 67bcf3623e1d .gitlab-ci.yml
--- a/.gitlab-ci.yml    Mon Feb 23 13:03:22 2026 +0100
+++ b/.gitlab-ci.yml    Mon Mar 16 14:33:30 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 4709b866f8dc -r 67bcf3623e1d .hgignore
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Mon Mar 16 14:33:30 2026 +0100
@@ -0,0 +1,7 @@
+syntax: glob
+*.py[cdo]
+*.egg-info
+dist/
+build/
+.tox/
+.coverage
diff -r 4709b866f8dc -r 67bcf3623e1d CHANGELOG
--- a/CHANGELOG Mon Feb 23 13:03:22 2026 +0100
+++ b/CHANGELOG Mon Mar 16 14:33:30 2026 +0100
@@ -1,3 +1,4 @@
+* Upgrade to pyproject
 * Add fund code to transaction
 
 Version 0.7.0 - 2025-11-24
diff -r 4709b866f8dc -r 67bcf3623e1d COPYRIGHT
--- a/COPYRIGHT Mon Feb 23 13:03:22 2026 +0100
+++ b/COPYRIGHT Mon Mar 16 14:33:30 2026 +0100
@@ -1,6 +1,6 @@
-Copyright (c) 2013-2025, Cédric Krier
-Copyright (c) 2014-2017, Nicolas Évrard
-Copyright (c) 2013-2025, B2CK
+Copyright (c) 2013-2025 Cédric Krier <[email protected]>
+Copyright (c) 2014-2017 Nicolas Évrard <[email protected]>
+Copyright (c) 2013-2025 B2CK SRL
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -r 4709b866f8dc -r 67bcf3623e1d MANIFEST.in
--- a/MANIFEST.in       Mon Feb 23 13:03:22 2026 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-include COPYRIGHT
-include README.rst
-include CHANGELOG
-include mt940/MT940.txt
diff -r 4709b866f8dc -r 67bcf3623e1d pyproject.toml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml    Mon Mar 16 14:33:30 2026 +0100
@@ -0,0 +1,39 @@
+[build-system]
+requires = ['hatchling >= 1', 'hatch-tryton']
+build-backend = 'hatchling.build'
+
+[project]
+name = 'mt940'
+dynamic = ['version', 'authors']
+requires-python = '>=3.5'
+maintainers = [
+    {name = "Tryton", email = "[email protected]"},
+    ]
+description = "A module to parse MT940 files"
+readme = 'README.rst'
+license = 'BSD-3-Clause'
+license-files = ['COPYRIGHT']
+keywords = ["MT940", "parser"]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Intended Audience :: Developers",
+    "Topic :: Office/Business",
+    "Topic :: Software Development :: Libraries",
+    "Topic :: Utilities",
+    ]
+
+[project.urls]
+homepage = "https://www.tryton.org/";
+changelog = "https://code.tryton.org/mt940/-/blob/branch/default/CHANGELOG";
+forum = "https://discuss.tryton.org/tags/mt940";
+issues = "https://bugs.tryton.org/mt940";
+repository = "https://code.tryton.org/mt940";
+
+[tool.hatch.version]
+path = 'mt940/__init__.py'
+
+[tool.hatch.build]
+packages = ['mt940']
+
+[tool.hatch.metadata.hooks.tryton]
+copyright = 'COPYRIGHT'
diff -r 4709b866f8dc -r 67bcf3623e1d setup.py
--- a/setup.py  Mon Feb 23 13:03:22 2026 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-# This file is part of mt940.  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('mt940', '__init__.py'))
-    return re.search("__version__ = '([0-9.]*)'", init).group(1)
-
-
-setup(name='mt940',
-    version=get_version(),
-    description='A module to parse MT940 files',
-    long_description=read('README.rst'),
-    author='Tryton',
-    author_email='[email protected]',
-    url='https://pypi.org/project/mt940/',
-    download_url='https://downloads.tryton.org/mt940/',
-    project_urls={
-        "Bug Tracker": 'https://bugs.tryton.org/mt940',
-        "Forum": 'https://discuss.tryton.org/tags/mt940',
-        "Source Code": 'https://code.tryton.org/mt940',
-        },
-    keywords='MT940 parser',
-    packages=find_packages(),
-    package_data={
-        'mt940': ['MT940.txt', 'MT940-optional.txt'],
-        },
-    python_requires='>=3.5',
-    classifiers=[
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: BSD License',
-        'Operating System :: OS Independent',
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.5',
-        '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 :: Office/Business',
-        'Topic :: Software Development :: Libraries',
-        'Topic :: Utilities',
-        ],
-    license='BSD',
-    )

Reply via email to