Skip to content

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.262%. remained the same
when pulling 3ff137b on INM-6:enh/pyproject.toml
into bb0a394 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

Copy link
Member Author

@Moritz-Alexander-Kern Moritz-Alexander-Kern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build wheels

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