elephant
elephant copied to clipboard
[ENH] Move to pyproject.toml
This PR moves Elephant from setup.py to pyproject.toml, aligning with PEP 518.
Key changes include:
- Introduction of
pyproject.toml
-
setup.py
is still needed to compile the C-code for the fim module.
The reason is that we need OS dependend compile args which are dynamically defined in setup.py
.
The pyproject.toml
does not natively support conditional logic like os_name == 'windows' directly within the configuration. The TOML format is static and doesn't allow for dynamic evaluation of conditions based on the operating system.
To achieve platform-specific compile arguments, we have to use a Python script, such as a setup.py
, which can programmatically determine the OS and apply the correct compile arguments.
In this context, as a configuration file for setuptools, setup.py
is not deprecated, see also: https://packaging.python.org/en/latest/discussions/setup-py-deprecated/