python-neo icon indicating copy to clipboard operation
python-neo copied to clipboard

Draft to move from setup.py to pyproject.toml

Open samuelgarcia opened this issue 3 years ago • 2 comments

Hi @apdavison @JuliaSprenger I think the new trend is to move from dynamic setup (setup.py) to static declaration (pyproject.toml). There somes peps about this and I think it help many tools for building and packaging.

Here a first draft for this. Normally everything is centralize in pyproject.toml.

It still use setuptools for building but the medata come from pyproject.toml.

If you have time to make feeback on this. It would be cool.

EDIT:

  • I needed to remove python3.7 and some numpy for core-test. I guess that pyproject.toml is not compatible with theses versions.

samuelgarcia avatar Oct 05 '22 09:10 samuelgarcia

doc/source/conf.py will need to be updated to get the version string from the metadata file.

Oups. I also forgot that. Is it still necessary in sphinx to put this variable or is it automatic now ? Do when parse the pyproject.toml for this ?

samuelgarcia avatar Oct 05 '22 11:10 samuelgarcia

@apdavison : other question. Do we keep this minimal setup.py ?

Or do we switch to ?

  • pip install . only instead of python setup.py install
  • pip install -e . only instead of python setup.py develop
  • build package of python with python -m build --wheel instead of python setup.py sdist

I will no modify NOT the doc because you are working inanother PR on it but maybe you could propagate this also no ?

samuelgarcia avatar Oct 05 '22 12:10 samuelgarcia