Skip to content

[BUG] Some packages no longer install their requirements.  #4042

@dwoz

Description

@dwoz

setuptools version

setuptools==68.2.0

Python version

>= 3.8

OS

All OSes

Additional environment information

No response

Description

Packages that change Distribution.install_requires after Distribution._finalize_options is called fail to install requirements.

The Salt codebase has, for a long time, modified Distribution.install_requires in an overridden Distribution.parse_command_line method in it's setup.py.

The changes in #4029 specifically 3c9d6ac96b breaks installing of requirements on current and previous Salt releases (see saltstack/salt#64149).

This change will also affect any other packages that make the assumption install_requires can be modified after the point which _finalize_options get's called in parse_config_files.

Expected behavior

Ideally, preserve previous behavior on order to not break existing package installations.

We, Salt, can fix this issue for future versions but it's a bummer all of our existing versions now fail to install properly.

How to Reproduce

Create a virtual environment. Pip install salt.

Output

This behavior can be observed by pip installing the latest Salt release.

$ pip3 install salt==3006.3
Collecting salt==3006.3
  Using cached salt-3006.3-py3-none-any.whl
Installing collected packages: salt
Successfully installed salt-3006.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions