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

[Docs] Quickstart - add pyproject.toml info to the declarative config section #4204

Merged
merged 11 commits into from
Feb 5, 2024
Merged

[Docs] Quickstart - add pyproject.toml info to the declarative config section #4204

merged 11 commits into from
Feb 5, 2024

Conversation

VladimirFokow
Copy link
Contributor

@VladimirFokow VladimirFokow commented Feb 4, 2024

Summary of changes

Preview.

  • Update the section about transitioning from setup.py to declarative config - so that it not only has setup.cfg but also pyproject.toml, and gives important context to the new users who are learning about these files for the first time.

  • Extract useful information about these files from GitHub comments to the docs. The new description conforms to the comments:

    the approach setuptools would like to take is to eventually use a single declarative format (pyproject.toml) instead of maintaining 2 (pyproject.toml / setup.cfg).

    For the time being there it is not in the horizon of events to drop setup.cfg completely. setup.cfg has not even been deprecated yet.
    Even if we eventually drop the custom parsing, chances are it will still keep working via "transpiling" it to pyproject.toml syntax for a long time, until it is safe to assume everyone moved out of it.

    Using pyproject.toml, however, imposes constraints (specially around dynamic) to the build. Some users are not comfortable with these constraints, so I don't think there should be a "black and white" recommendation.

Note:
Maybe an info box was more appropriate than note?
I don't know the rules here or if it even matters, but info's syntax looked complicated so I chose a simple .. note::


Please, suggest edits if this section can be made more accurate.
I think it's important to update this section from what it currently is.


Closes #4200

Pull Request Checklist

  • Changes have tests
  • News fragment added in [newsfragments/]

IMO this is a better link - this page lists more issues, 
and actually compares setup.cfg to pyproject.toml in this sense
- fix link
- make last paragraph a note (for easier readability)
- change language to "still has" to "still may have" to be easier to maintain
@VladimirFokow VladimirFokow marked this pull request as ready for review February 4, 2024 21:46
@VladimirFokow VladimirFokow changed the title [DOC] Quickstart - add pyproject.toml info to the declarative config section [Docs] Quickstart - add pyproject.toml info to the declarative config section Feb 4, 2024
docs/userguide/quickstart.rst Outdated Show resolved Hide resolved
docs/userguide/quickstart.rst Outdated Show resolved Hide resolved
@abravalheri
Copy link
Contributor

Thank you very much @VladimirFokow for working on this.

@VladimirFokow
Copy link
Contributor Author

VladimirFokow commented Feb 5, 2024

Can also remove "(usually setup.cfg)" from the setup.cfg guide?:

Setuptools allows using configuration files (usually setup.cfg) to define a package’s metadata and other options that are normally supplied to the setup() function (declarative config).

@abravalheri
Copy link
Contributor

Can also remove "(usually setup.cfg)" from the setup.cfg guide?:

Yes, maybe replace usually with for example?

@abravalheri abravalheri merged commit 2bcabe1 into pypa:main Feb 5, 2024
2 checks passed
@abravalheri
Copy link
Contributor

Thank you very much!

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.

[Docs] section: (setup.py vs setup.cfg) -> update with: (setup.py vs pyproject.toml)?
2 participants