Skip to content

Conversation

@dataflake
Copy link
Member

This PR improves generating the readme attribute for a package:

  • if there's just a readme file, put readme into the [project] section with the readme file name. This is what's happened so far.
  • if there's a readme and a change log file, put them into the [tool.setuptools.dynamic] section so both get used. This is similar to what most packages did with the long_description setting in setup.py.

The PR does not attempt to parse previously used file names out of the long_description value because the format is undefined, every package did it slightly differently. It just assumes that maintainers want to concatenate the readme and the change log as content for the PyPI project page.

If the package did something entirely different it is up to the script user and/or the PR reviewers to catch the difference and correct that manually.

@dataflake dataflake requested a review from icemac November 28, 2025 10:26
@dataflake dataflake self-assigned this Nov 28, 2025
dataflake added a commit that referenced this pull request Nov 28, 2025
@coveralls
Copy link

coveralls commented Nov 28, 2025

Pull Request Test Coverage Report for Build 19765675198

Details

  • 0 of 20 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 14.867%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/zope/meta/setup_to_pyproject.py 0 20 0.0%
Totals Coverage Status
Change from base Build 19761874204: -0.2%
Covered Lines: 240
Relevant Lines: 1218

💛 - Coveralls

@dataflake
Copy link
Member Author

I'm going to merge this myself because it is tested and works just as intended (see https://pypi.org/project/ExtensionClass/6.2.1a2/), I have also manually applied the same changes to all converted repositories that currently use just readme = 'README.rst'.

@dataflake dataflake merged commit f65223e into master Nov 29, 2025
13 checks passed
@dataflake dataflake deleted the dataflake/dynamic_readme branch November 29, 2025 07:26
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.

3 participants