From b1addbc0589fde348282ed591578abf5b5e9cd83 Mon Sep 17 00:00:00 2001 From: Don Date: Fri, 22 May 2026 14:36:25 +0000 Subject: [PATCH 1/2] Migrate project metadata from setup.py to pyproject.toml --- pyproject.toml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 41 ------------------------------------- 2 files changed, 55 insertions(+), 41 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 44ffe2f..a4e9b67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,58 @@ +[build-system] +requires = ["setuptools>=61.0.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "icecream" +authors = [ + {name = "Ansgar Grunseid", email = "grunseid@gmail.com"}, +] +description = """ +Never use print() to debug again: inspect variables, expressions, and \ +program execution with a single, simple function call.\ +""" +readme = "README.md" +requires-python = ">=3.8" +license = {text = "MIT"} +classifiers = [ + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "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", + "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Python :: Implementation :: CPython", +] +dependencies = [ + "colorama>=0.3.9", + "pygments>=2.2.0", + "executing>=2.1.0", + "asttokens>=2.0.1", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/gruns/icecream" + +[project.optional-dependencies] +test = [ + "tox>=4", +] + +[tool.setuptools.dynamic] +version = {attr = "icecream.__version__.__version__"} + +[tool.setuptools] +include-package-data = true + [tool.mypy] show_error_codes=true disallow_untyped_defs=true diff --git a/setup.py b/setup.py index c304037..951017f 100755 --- a/setup.py +++ b/setup.py @@ -64,48 +64,7 @@ def run_tests(self) -> None: result = TextTestRunner().run(suite) sys.exit(0 if result.wasSuccessful() else -1) - setup( - name=meta['__title__'], - license=meta['__license__'], - version=meta['__version__'], - author=meta['__author__'], - author_email=meta['__contact__'], - url=meta['__url__'], - description=meta['__description__'], - long_description=( - 'Information and documentation can be found at ' - 'https://github.com/gruns/icecream.'), - platforms=['any'], - packages=find_packages(exclude=['tests', 'tests.*']), - include_package_data=True, - package_data={'icecream': ['py.typed']}, - classifiers=[ - 'License :: OSI Approved :: MIT License', - 'Natural Language :: English', - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Libraries', - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - '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', - 'Programming Language :: Python :: Implementation :: PyPy', - 'Programming Language :: Python :: Implementation :: CPython', - ], - tests_require=[ - 'tox>=4', - ], - install_requires=[ - 'colorama>=0.3.9', - 'pygments>=2.2.0', - 'executing>=2.1.0', - 'asttokens>=2.0.1', - ], cmdclass={ 'test': RunTests, 'publish': Publish, From 6af248685f3c15c991ce4d37303c9fbce8f9b85f Mon Sep 17 00:00:00 2001 From: Don Date: Fri, 22 May 2026 15:13:00 +0000 Subject: [PATCH 2/2] Created fork README with contribution details --- README-contributor.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 README-contributor.md diff --git a/README-contributor.md b/README-contributor.md new file mode 100644 index 0000000..3223ecf --- /dev/null +++ b/README-contributor.md @@ -0,0 +1,10 @@ +# Icecream (Forked) - My Contribution + +I used this repository to modernise the build infrastructure of the `icecream` library. + +### What I Accomplished: +- Migrated static metadata from `setup.py` to a PEP 621-compliant `pyproject.toml` file. +- Preserved custom `cmdclass` handlers for testing/publishing to maintain full backwards compatibility. +- Verified the build locally via editable installation (`pip install -e .`). + +**View my official, live Pull Request here:** https://github.com/gruns/icecream/pull/237 \ No newline at end of file