Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Move to pyproject.toml #608

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

Moritz-Alexander-Kern
Copy link
Member

@Moritz-Alexander-Kern Moritz-Alexander-Kern commented Nov 22, 2023

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/

@coveralls
Copy link
Collaborator

coveralls commented Nov 22, 2023

Coverage Status

coverage: 88.257% (-0.1%) from 88.401%
when pulling 650edf2 on INM-6:enh/pyproject.toml
into 123ca04 on NeuralEnsemble:master.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

@Moritz-Alexander-Kern Moritz-Alexander-Kern added the enhancement Editing an existing module, improving something label Nov 22, 2023
Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

Moritz-Alexander-Kern

This comment was marked as outdated.

@Moritz-Alexander-Kern
Copy link
Member Author

Editable install with setup.py will be deprecated with pip 25.0

DEPRECATION: Legacy editable install of elephant==1.2.0b1 from file:/// (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at pypa/pip#11457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Editing an existing module, improving something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants