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

Avoid modification of install_requires and extra_requires that deviates from core metadata #3903

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Apr 24, 2023

Summary of changes

  • Extract the logic for writing requires.txt from the egg_info module into _requirestxt.py.
  • Extract egg_info-specific processing of requirements from dist.py to _requitestxt.py.
  • Avoid direct modifications of install_requires and extra_requires.
    Instead only process them on demand, when the requires.txt file is needed for creating .egg-info directories.

This ensures dist.install_requires and dist.extra_requires remains compatible with core metadata and allow future changes to generate Requires-Dist in METADATA files (which are not compatible with requires.txt).


This is part of a series of PRs:

The motivation for this series of PRs is the following:


Pull Request Checklist

This change extracts the logic for writing 'requires.txt' from
the ``egg_info`` module into ``_requirestxt``.

It also adds the missing pre-processing for ``install_requires`` and
``extras_require`` previously done in ``dist`` but now implemented in
``_requires.txt``.
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.

1 participant