Skip to content

Add pre_install configuration option #2886

@Czaki

Description

@Czaki

What's the problem this feature will solve?

Next to the normal test, I would have the oldest-supported test. I test my code on the oldest supported version of packages based on requirements constrains from setup.cfg.

Currently, it requires me to run separate commands before calling tox (or make tox calling tox) to extract minimal requirements from package metadata. So time to time, I have false negative runs when executing it manually. I also need to have a more complex CI configuration.

Describe the solution you'd like

Add pre_install command that will be executed before the installation of package. To allow modify metadata/requirements file.

Manual curated list of minimal requirements to be passed to deps:
https://github.com/4DNucleome/PartSeg/blob/develop/build_utils/minimal-req.txt
https://github.com/4DNucleome/PartSeg/blob/develop/tox.ini#L91

Special call of script that modifies setup.cfg for testing minimal requirements:
https://github.com/napari/napari/blob/20319df0b397f85054e1c7e728d393eb7a7a7b38/.github/workflows/test_pull_requests.yml#L129

Alternative Solutions

  1. run a separate command before tox call
  2. run command and reinstall package in commadn_pre - additional maintenance need to keep consistency with other envs
  3. modify install_command to execute pinning before call pip install - additional maintenance need to keep consistency with other envs

All works but all looks like a dirty solutions.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions