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

 .gitlab-ci.yml |   4 ++--
 .hgignore      |   7 +++++++
 CHANGELOG      |   2 ++
 COPYRIGHT      |   2 +-
 MANIFEST.in    |   5 -----
 README         |  18 ------------------
 README.rst     |  18 ++++++++++++++++++
 pyproject.toml |  40 ++++++++++++++++++++++++++++++++++++++++
 setup.py       |  52 ----------------------------------------------------
 9 files changed, 70 insertions(+), 78 deletions(-)

diffs (196 lines):

diff -r be8aadb726f6 -r a974dbfe88eb .gitlab-ci.yml
--- a/.gitlab-ci.yml    Sun Feb 22 16:41:32 2026 +0100
+++ b/.gitlab-ci.yml    Mon Mar 16 14:31:20 2026 +0100
@@ -40,7 +40,7 @@
 check-dist:
   extends: .check
   before_script:
-    - pip install twine
+    - pip install build twine
   script:
-    - python setup.py sdist
+    - pyproject-build
     - twine check dist/*
diff -r be8aadb726f6 -r a974dbfe88eb .hgignore
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Mon Mar 16 14:31:20 2026 +0100
@@ -0,0 +1,7 @@
+syntax: glob
+*.py[cdo]
+*.egg-info
+dist/
+build/
+.tox/
+.coverage
diff -r be8aadb726f6 -r a974dbfe88eb CHANGELOG
--- a/CHANGELOG Sun Feb 22 16:41:32 2026 +0100
+++ b/CHANGELOG Mon Mar 16 14:31:20 2026 +0100
@@ -1,3 +1,5 @@
+* Upgrade to pyproject
+
 Version 0.8.0 - 2023-03-18
 * Manage preferred size
 
diff -r be8aadb726f6 -r a974dbfe88eb COPYRIGHT
--- a/COPYRIGHT Sun Feb 22 16:41:32 2026 +0100
+++ b/COPYRIGHT Mon Mar 16 14:31:20 2026 +0100
@@ -1,5 +1,5 @@
 Copyright (C) 2012 Antoine Smolders
-Copyright (C) 2012-2022 Cédric Krier
+Copyright (C) 2012-2022 Cédric Krier <[email protected]>
 Copyright (C) 2007 Samuel Abels <http://debain.org>
 
 This program is free software; you can redistribute it and/or
diff -r be8aadb726f6 -r a974dbfe88eb MANIFEST.in
--- a/MANIFEST.in       Sun Feb 22 16:41:32 2026 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-include LICENSE
-include COPYRIGHT
-include README
-include CHANGELOG
-include doc/*
diff -r be8aadb726f6 -r a974dbfe88eb README
--- a/README    Sun Feb 22 16:41:32 2026 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-GooCalendar
-===========
-
-A calendar widget for GTK using GooCanvas
-
-Nutshell
---------
-
-Example usage::
-
-    >>> import datetime
-    >>> import goocalendar
-    >>> event_store = goocalendar.EventStore()
-    >>> calendar = goocalendar.Calendar(event_store)
-    >>> event = goocalendar.Event('Birthday',
-    ...     datetime.date.today(),
-    ...     bg_color='lightgreen')
-    >>> event_store.add(event)
diff -r be8aadb726f6 -r a974dbfe88eb README.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst        Mon Mar 16 14:31:20 2026 +0100
@@ -0,0 +1,18 @@
+GooCalendar
+===========
+
+A calendar widget for GTK using GooCanvas
+
+Nutshell
+--------
+
+Example usage::
+
+    >>> import datetime
+    >>> import goocalendar
+    >>> event_store = goocalendar.EventStore()
+    >>> calendar = goocalendar.Calendar(event_store)
+    >>> event = goocalendar.Event('Birthday',
+    ...     datetime.date.today(),
+    ...     bg_color='lightgreen')
+    >>> event_store.add(event)
diff -r be8aadb726f6 -r a974dbfe88eb pyproject.toml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml    Mon Mar 16 14:31:20 2026 +0100
@@ -0,0 +1,40 @@
+[build-system]
+requires = ['hatchling >= 1', 'hatch-tryton']
+build-backend = 'hatchling.build'
+
+[project]
+name = 'GooCalendar'
+dynamic = ['version', 'authors']
+requires-python = '>=3.4'
+maintainers = [
+    {name = "Tryton", email = "[email protected]"},
+    ]
+description = "A calendar widget for GTK using PyGoocanvas"
+readme = 'README.rst'
+license = 'GPL-2.0-or-later'
+license-files = ['LICENSE', 'COPYRIGHT']
+keywords = ["calendar", "GTK", "GooCanvas", "widget"]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Environment :: X11 Applications :: GTK",
+    "Intended Audience :: Developers",
+    "Topic :: Software Development :: Libraries :: Python Modules",
+    "Topic :: Software Development :: Widget Sets",
+    ]
+
+[project.urls]
+homepage = "https://www.tryton.org/";
+documentation = "https://docs.tryton.org/goocalendar";
+changelog = 
"https://code.tryton.org/goocalendar/-/blob/branch/default/CHANGELOG";
+forum = "https://discuss.tryton.org/tags/goocalendar";
+issues = "https://bugs.tryton.org/goocalendar";
+repository = "https://code.tryton.org/goocalendar";
+
+[tool.hatch.version]
+path = 'goocalendar/__init__.py'
+
+[tool.hatch.build]
+packages = ['goocalendar']
+
+[tool.hatch.metadata.hooks.tryton]
+copyright = 'COPYRIGHT'
diff -r be8aadb726f6 -r a974dbfe88eb setup.py
--- a/setup.py  Sun Feb 22 16:41:32 2026 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# This file is part of GooCalendar.  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 find_packages, 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(os.path.join('goocalendar', '__init__.py'))
-    return re.search("__version__ = '([0-9.]*)'", init).group(1)
-
-
-setup(name='GooCalendar',
-    version=get_version(),
-    description='A calendar widget for GTK using PyGoocanvas',
-    long_description=read('README'),
-    author='Tryton',
-    author_email='[email protected]',
-    url='https://pypi.python.org/pypi/goocalendar',
-    download_url='https://downloads.tryton.org/goocalendar/',
-    project_urls={
-        "Bug Tracker": 'https://goocalendar.tryton.org/',
-        "Documentation": 'https://docs.tryton.org/goocalendar',
-        "Forum": 'https://discuss.tryton.org/tags/goocalendar',
-        "Source Code": 'https://code.tryton.org/goocalendar',
-        },
-    keywords='calendar GTK GooCanvas widget',
-    packages=find_packages(),
-    classifiers=[
-        'Development Status :: 5 - Production/Stable',
-        'Environment :: X11 Applications :: GTK',
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
-        'Operating System :: OS Independent',
-        'Programming Language :: Python :: 3',
-        'Topic :: Software Development :: Libraries :: Python Modules',
-        'Topic :: Software Development :: Widget Sets',
-        ],
-    license='GPL-2',
-    python_requires='>=3.4',
-    )

Reply via email to