Skip to content

Calling setup.py directly is no longer recommended #4026

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

Open
4 tasks
ahankinson opened this issue Apr 14, 2025 · 1 comment
Open
4 tasks

Calling setup.py directly is no longer recommended #4026

ahankinson opened this issue Apr 14, 2025 · 1 comment

Comments

@ahankinson
Copy link
Contributor

See:

But also:

TL;DR, calling setup.py directly (python setup.py ... )is no longer recommended, although there isn't a real clear path forward. The hang-up seems to be (unsurprisingly) the building of the C++ parts. But there have been movements in the latest versions of Python to remove or replace various bits of the "traditional" build system.

Verovio only seems to call setup.py directly for building the source distributions. However, it also recommends calling setup.py directly in the book: https://book.verovio.org/installing-or-building-from-sources/python.html#building-the-toolkit-without-cmake

This might be a good opportunity to move to the new pyproject.toml standard, https://packaging.python.org/en/latest/guides/writing-pyproject-toml/.

ChatGPT is suggesting we look at [scikit-build-core])https://github.com/scikit-build/scikit-build-core) as a build backend, which seems to be a way of using CMake in building the Python extensions. This might be good, since it would mean that there would be a single build system, instead of two different ones for Python.

So the path forward seems to be:

  • Move what we can to pyproject.toml
  • (Interim?) continue to use the existing setup.py as the build backend in the pyproject file?
  • Integrate scikit-build-core
  • Change the GH actions to use the new setup?

This seems like a significant amount of work, and since everything is working now it's not urgent. But it's probably an opportunity to update to pyproject.toml and unify the build system on CMake.

@ahankinson ahankinson changed the title setup.py is no longer recommended for use Calling setup.py directly is no longer recommended for use Apr 14, 2025
@ahankinson ahankinson changed the title Calling setup.py directly is no longer recommended for use Calling setup.py directly is no longer recommended Apr 14, 2025
@ahankinson
Copy link
Contributor Author

In addition: The current GitHub python actions use Python 3.9 as the base installation, but this will be EOL in October 2025. Ideally we would use this opportunity to bring things up to the latest stable (3.13 at this moment) BUT as of Python 3.11, setuptools is deprecated in the base installation.

So moving to anything later than 3.10 will anyway require a re-write of the current setup.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants