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 metadata from setup.py to setup.cfg #288

Merged
merged 3 commits into from Sep 23, 2022
Merged

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Sep 22, 2022

This pull request was created using https://pypi.org/project/setuptools-py2cfg plus manual modifications.

https://setuptools.pypa.io/en/latest/userguide/quickstart.html#basic-use

We recommend users expose as much as possible configuration in a more declarative way via the pyproject.toml or setup.cfg, and keep the setup.py minimal with only the dynamic parts (or even omit it completely if applicable).

Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks ...

Just one question; why not move to pyproject.toml?

  • I'm happy to take this step than pyproject.toml but just wondering why
  • I believe setuptools support enough of the PEP now for pyproject.toml for pure python projects like us - I could be wrong tho

[metadata]
license_file = LICENSE
name = flake8-bugbear
version = attr: bugbear.__version__
Copy link
Collaborator

Choose a reason for hiding this comment

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

TIL - This will help releases. Thanks.

@cclauss
Copy link
Contributor Author

cclauss commented Sep 22, 2022

why not move to pyproject.toml?

Because flake8 does not support py project.toml. PyCQA/flake8#234

@cooperlees
Copy link
Collaborator

Good enough reason for now. Thanks for this. Lets roll from here and move to pyproject.toml when flake8 does.

@cooperlees cooperlees merged commit 87e4d66 into PyCQA:main Sep 23, 2022
@cclauss cclauss deleted the patch-1 branch September 23, 2022 17:44
@wwuck
Copy link

wwuck commented Sep 26, 2022

@cooperlees @cclauss FYI, there is a plugin that allows pyproject.toml configuration for flake8.

https://pypi.org/project/Flake8-pyproject/

@cclauss
Copy link
Contributor Author

cclauss commented Sep 26, 2022

My sense is that a separate, supported text file is safer in the near-term and long-term than adding another dependency.

In fact, there are numerous outside dependencies that attempt to paper over this situation:

But none of these are from PyCQA and I believe that the best approach would be for the PyCQA to solve this problem internally rather than encouraging the community to paper over it by adding external dependencies.

@cooperlees
Copy link
Collaborator

Totally agree with PyCQA solving this and making it first class.

Lets follow + comment on PyCQA/flake8#234

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

Successfully merging this pull request may close these issues.

None yet

3 participants