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

Migrate to pyproject.toml based build (leveraging PEP 517/518/621) #9166

Open
4 tasks done
zahlman opened this issue Jul 31, 2024 · 0 comments
Open
4 tasks done

Migrate to pyproject.toml based build (leveraging PEP 517/518/621) #9166

zahlman opened this issue Jul 31, 2024 · 0 comments

Comments

@zahlman
Copy link

zahlman commented Jul 31, 2024

Checklist

  • I have checked the issues list
    for similar or identical enhancement to an existing feature.
  • I have checked the pull requests list
    for existing proposed enhancements.
  • I have checked the commit log
    to find out if the same enhancement was already implemented in the
    main branch.
  • I have included all related issues and possible duplicate issues in this issue
    (If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

Possible Duplicates

  • None

Brief Summary

I was surprised to hear that Celery was affected by the recent Setuptools issue, since it's pure Python. Although wheels are available, many users who may have chosen to build from source anyway would have been affected. (The same problem also occurred with Requests.) At any rate, a setup.py file should be completely unnecessary for building a wheel for a pure Python sdist in any normal circumstance. Storing metadata as data in pyproject.toml is cleaner, simpler and more secure. The project already has a pyproject.toml file but currently it's only used to store configuration for dev tools.

Design

Add a PEP 621-compliant project table to pyproject.toml to represent the project metadata currently represented as keyword arguments to setup. For the dynamically-determined metadata (which currently comes from parsing a source file manually), use a [tool.setuptools.dynamic] table. Optionally use [build-system] to specify a Setuptools version.

Architectural Considerations

None

Proposed Behavior

Users who build a Celery sdist will no longer needlessly be exposed to the risks associated with running arbitrary code from a setup.py file, nor to the risk of future Setuptools versions causing other problems with setup.py contents due to deprecations/removals.

Proposed UI/UX

No changes.

Diagrams

N/A

Alternatives

None

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

1 participant