Skip to content

Commit ff45646

Browse files
authored
Update python packaging (#207)
* move setup.cfg metadata to pyproject.toml * update changelog
1 parent 82eadb5 commit ff45646

File tree

4 files changed

+63
-58
lines changed

4 files changed

+63
-58
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Changes:
55
* Add `clean` parameter to wipe existing population to `json_read` ([#202](https://github.com/xcsf-dev/xcsf/pull/202))
66
* Add Ruff linting and formatting for Python ([#196](https://github.com/xcsf-dev/xcsf/pull/196))
77
* Fix Python `json_read` crashing when the new population is empty ([#205](https://github.com/xcsf-dev/xcsf/pull/205))
8-
* Reduce `max_trials` in Python tests for speed
8+
* Reduce `max_trials` in Python tests for speed ([#206](https://github.com/xcsf-dev/xcsf/pull/206))
9+
* Update Python packaging: move `setup.cfg` metadata to `pyproject.toml` ([#207](https://github.com/xcsf-dev/xcsf/pull/207))
910

1011
## Version 1.4.7 (Aug 19, 2024)
1112

pyproject.toml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,65 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools>=42"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "xcsf"
7+
version = "1.4.7"
8+
description = "XCSF learning classifier system: rule-based evolutionary machine learning"
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
license = {text = "GPL-3.0"}
12+
maintainers = [
13+
{name = "Richard Preen", email = "[email protected]"}
14+
]
15+
keywords = [
16+
"divide and conquer",
17+
"evolutionary algorithm",
18+
"genetic programming",
19+
"learning classifier system",
20+
"least squares",
21+
"machine learning",
22+
"neural networks",
23+
"neuroevolution",
24+
"reinforcement learning",
25+
"rule-based",
26+
"supervised learning",
27+
"stochastic gradient descent",
28+
"XCS",
29+
"XCSF ",
30+
]
31+
classifiers = [
32+
"Development Status :: 5 - Production/Stable",
33+
"Intended Audience :: Developers",
34+
"Intended Audience :: Science/Research",
35+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
36+
"Programming Language :: C",
37+
"Programming Language :: C++",
38+
"Programming Language :: Python :: 3.9",
39+
"Programming Language :: Python :: 3.10",
40+
"Programming Language :: Python :: 3.11",
41+
"Programming Language :: Python :: 3.12",
42+
"Programming Language :: Python :: 3.13",
43+
"Topic :: Scientific/Engineering",
44+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
45+
"Operating System :: POSIX :: Linux",
46+
"Operating System :: MacOS :: MacOS X",
47+
"Operating System :: Microsoft :: Windows :: Windows 10",
48+
"Operating System :: Microsoft :: Windows :: Windows 11 ]",
49+
]
50+
51+
[project.urls]
52+
"Homepage" = "https://github.com/xcsf-dev/xcsf"
53+
"Changelog" = "https://github.com/xcsf-dev/xcsf/CHANGELOG.md"
54+
"Documentation" = "https://github.com/xcsf-dev/xcsf/wiki"
55+
"Bug Tracker" = "https://github.com/xcsf-dev/xcsf/issues"
56+
"Discussions" = "https://github.com/xcsf-dev/xcsf/discussions"
57+
58+
[tool.setuptools]
59+
zip-safe = false
60+
include-package-data = true
61+
packages = {find = {exclude = ["build*", "cfg*", "doc*", "python*", "test*"]}}
62+
563
[tool.ruff]
664
indent-width = 4
765
line-length = 88

setup.cfg

Lines changed: 0 additions & 53 deletions
This file was deleted.

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python3
22
#
3-
# Copyright (C) 2021--2024 Richard Preen <[email protected]>
3+
# Copyright (C) 2021--2025 Richard Preen <[email protected]>
44
#
55
# This program is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
2323
import subprocess
2424
import sys
2525

26-
from setuptools import Extension, find_packages, setup
26+
from setuptools import Extension, setup
2727
from setuptools.command.build_ext import build_ext
2828

2929

@@ -78,7 +78,6 @@ def build_extension(self, ext):
7878

7979

8080
setup(
81-
packages=find_packages(),
8281
ext_modules=[CMakeExtension("xcsf/xcsf")],
8382
cmdclass={"build_ext": CMakeBuild},
8483
)

0 commit comments

Comments
 (0)