diff --git a/CHANGELOG.md b/CHANGELOG.md index f4be7726c..ff08de118 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ Changes: * Add `clean` parameter to wipe existing population to `json_read` ([#202](https://github.com/xcsf-dev/xcsf/pull/202)) * Add Ruff linting and formatting for Python ([#196](https://github.com/xcsf-dev/xcsf/pull/196)) * Fix Python `json_read` crashing when the new population is empty ([#205](https://github.com/xcsf-dev/xcsf/pull/205)) -* Reduce `max_trials` in Python tests for speed +* Reduce `max_trials` in Python tests for speed ([#206](https://github.com/xcsf-dev/xcsf/pull/206)) +* Update Python packaging: move `setup.cfg` metadata to `pyproject.toml` ([#207](https://github.com/xcsf-dev/xcsf/pull/207)) ## Version 1.4.7 (Aug 19, 2024) diff --git a/pyproject.toml b/pyproject.toml index 1520940ea..1b7151be0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,65 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools>=42"] build-backend = "setuptools.build_meta" +[project] +name = "xcsf" +version = "1.4.7" +description = "XCSF learning classifier system: rule-based evolutionary machine learning" +readme = "README.md" +requires-python = ">=3.9" +license = {text = "GPL-3.0"} +maintainers = [ + {name = "Richard Preen", email = "rpreen@gmail.com"} +] +keywords = [ + "divide and conquer", + "evolutionary algorithm", + "genetic programming", + "learning classifier system", + "least squares", + "machine learning", + "neural networks", + "neuroevolution", + "reinforcement learning", + "rule-based", + "supervised learning", + "stochastic gradient descent", + "XCS", + "XCSF ", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Programming Language :: C", + "Programming Language :: C++", + "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", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows :: Windows 10", + "Operating System :: Microsoft :: Windows :: Windows 11 ]", +] + +[project.urls] +"Homepage" = "https://github.com/xcsf-dev/xcsf" +"Changelog" = "https://github.com/xcsf-dev/xcsf/CHANGELOG.md" +"Documentation" = "https://github.com/xcsf-dev/xcsf/wiki" +"Bug Tracker" = "https://github.com/xcsf-dev/xcsf/issues" +"Discussions" = "https://github.com/xcsf-dev/xcsf/discussions" + +[tool.setuptools] +zip-safe = false +include-package-data = true +packages = {find = {exclude = ["build*", "cfg*", "doc*", "python*", "test*"]}} + [tool.ruff] indent-width = 4 line-length = 88 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 850c6b43e..000000000 --- a/setup.cfg +++ /dev/null @@ -1,53 +0,0 @@ -[metadata] -name = xcsf -version = 1.4.7 -description = XCSF learning classifier system: rule-based evolutionary machine learning -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/xcsf-dev/xcsf -maintainer = Richard Preen -maintainer_email = rpreen@gmail.com -license = GPL-3.0 -license_files = LICENSE.md -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Intended Audience :: Science/Research - License :: OSI Approved :: GNU General Public License v3 (GPLv3) - Programming Language :: C - Programming Language :: C++ - 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 - Topic :: Scientific/Engineering - Topic :: Scientific/Engineering :: Artificial Intelligence - Operating System :: POSIX :: Linux - Operating System :: MacOS :: MacOS X - Operating System :: Microsoft :: Windows :: Windows 10 - Operating System :: Microsoft :: Windows :: Windows 11 -keywords = - divide and conquer - evolutionary algorithm - genetic programming - learning classifier system - least squares - machine learning - neural networks - neuroevolution - reinforcement learning - rule-based - supervised learning - stochastic gradient descent - XCS - XCSF -project_urls = - Changelog = https://github.com/xcsf-dev/xcsf/CHANGELOG.md - Documentation = https://github.com/xcsf-dev/xcsf/wiki - Bug Tracker = https://github.com/xcsf-dev/xcsf/issues - Discussions = https://github.com/xcsf-dev/xcsf/discussions - -[options] -python_requires = >=3.9 -zip_safe = False diff --git a/setup.py b/setup.py index 594bdf108..70e93672c 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -# Copyright (C) 2021--2024 Richard Preen +# Copyright (C) 2021--2025 Richard Preen # # 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 @@ -23,7 +23,7 @@ import subprocess import sys -from setuptools import Extension, find_packages, setup +from setuptools import Extension, setup from setuptools.command.build_ext import build_ext @@ -78,7 +78,6 @@ def build_extension(self, ext): setup( - packages=find_packages(), ext_modules=[CMakeExtension("xcsf/xcsf")], cmdclass={"build_ext": CMakeBuild}, )