Skip to content

Commit a012ede

Browse files
committed
fixup workflow modernize install with pyproject
1 parent e4bb485 commit a012ede

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

pyproject.toml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# see also
2+
# https://packaging.python.org/en/latest/guides/modernize-setup-py-project/
3+
# https://xebia.com/blog/an-updated-guide-to-setuptools-and-pyproject-toml/
4+
# https://alpopkes.com/posts/python/packaging_tools/
5+
# https://dev.to/adamghill/python-package-manager-comparison-1g98
6+
#
7+
8+
[build-system]
9+
requires = [
10+
"setuptools >=79",
11+
# "setuptools-scm", # if we want to use git versions for versioning
12+
"wheel", # setuptools doesn't need wheel anymore, see https://pypi.org/project/wheel/
13+
]
14+
build-backend = "setuptools.build_meta"
15+
16+
[project]
17+
name = "comocma"
18+
description = """Multiobjective framework Sofomore, instantiated with
19+
the single-objective solver CMA-ES to obtain
20+
the Multiobjective evolutionary algorithm COMO-CMA-ES."""
21+
authors = [
22+
{name = "Cheikh Toure"},
23+
{name = "Nikolaus Hansen"},
24+
]
25+
dependencies = [
26+
"numpy",
27+
"cma>=3",
28+
"moarchiving"
29+
]
30+
dynamic = ["version", # see tool.setuptools.dynamic below
31+
# "readme",
32+
]
33+
readme = "readme.md"
34+
license = "BSD-3-Clause"
35+
license-files = ["LICENSE"]
36+
37+
keywords = [
38+
"optimization",
39+
"COMO-CMA-ES",
40+
"Sofomore",
41+
"multi-objective",
42+
"CMA-ES",
43+
"cmaes",
44+
"evolution strategy"
45+
]
46+
maintainers = [
47+
{name = "Nikolaus Hansen", email = "authors_firstname.lastname@inria.fr"},
48+
]
49+
classifiers = [
50+
"Environment :: Console",
51+
"Framework :: IPython",
52+
"Framework :: Jupyter",
53+
"Intended Audience :: Science/Research",
54+
"Intended Audience :: Education",
55+
"Intended Audience :: Other Audience",
56+
"Topic :: Scientific/Engineering",
57+
"Topic :: Scientific/Engineering :: Mathematics",
58+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
59+
"Operating System :: OS Independent",
60+
"Programming Language :: Python :: 2.7",
61+
"Programming Language :: Python :: 3",
62+
"Development Status :: 4 - Beta",
63+
]
64+
65+
[tool.setuptools]
66+
# packages = ["cma", "cma.utilities"] # fails when they are in an src/ folder
67+
include-package-data = false # true is default, false doesn't change anything
68+
69+
[tool.setuptools.packages.find] # for where=. works only in a clean folder
70+
# where = ["src"] # this doesn't work, it always takes the root too?
71+
include = ["comocma*"]
72+
exclude = ["comocma.*", "comocma-*"]
73+
74+
# namespaces = false
75+
76+
[project.optional-dependencies]
77+
plotting = ["matplotlib"]
78+
constrained-solution-tracking = ["moarchiving"]
79+
80+
[project.urls]
81+
Homepage = "https://github.com/CMA-ES/pycma"
82+
# Documentation = "" # API / notebooks / practical hints
83+
Repository = "https://github.com/CMA-ES/pycma.git"
84+
"Bug Tracker" = "https://github.com/CMA-ES/pycma/issues"
85+
86+
[tool.setuptools.dynamic]
87+
version = {attr = "comocma.__version__"} # any module attribute compatible with ast.literal_eval
88+
89+
# readme = {file = ["README.txt"]}
90+
# In the dynamic table, the attr directive [3] will read an attribute from the given module [4], while file will read the contents of all given files and concatenate them in a single string.
91+
92+
[tool.ruff.lint]
93+
ignore = ['F401', 'E402', 'E701', 'E722', ]
94+
# select = ["NPY201"]
File renamed without changes.

0 commit comments

Comments
 (0)