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

Per-command dependencies #1201

Closed
Kentzo opened this issue Nov 17, 2017 · 2 comments
Closed

Per-command dependencies #1201

Kentzo opened this issue Nov 17, 2017 · 2 comments

Comments

@Kentzo
Copy link
Contributor

Kentzo commented Nov 17, 2017

It's not unusual for a setuptools command to have dependencies. The most common example is tests_require, but there are other applications. Often this is resolved by introspecting name of the command at runtime and constructing list for setup_requires accordingly.

With installation requirements there is more or less standard practice of having common dependencies expressed via install_requires and optional via extras_require.

I propose the similar hierarchy for setuptools commands:

  • setup_requires should be used for common dependencies
  • setup_extra_requires should be used similarly to extra_requires where keys are commands like test, install, or any other string allowed as a command name

Backward compatibility

  • tests_require should be an alias to setup_extra_requires['test']; if both are specified error should be issued
  • install_requires is independent from setup_extra_requires['install'] because it expresses package requirements, not setuptools command execution requirements
@Kentzo
Copy link
Contributor Author

Kentzo commented Nov 21, 2017

Given that PEP-518 was accepted, can (should?) this feature be expressed via pyproject.toml?

@pganssle pganssle added Needs Triage Issues that need to be evaluated for severity and status. proposal Needs Discussion Issues where the implementation still needs to be discussed. and removed Needs Triage Issues that need to be evaluated for severity and status. labels Oct 19, 2018
@jaraco
Copy link
Member

jaraco commented Oct 22, 2021

Yes, this issue is obsolete, and setuptools has embarked on the path of discouraging commands altogether, and has deprecated setup_requires/tests_require (#2823).

@jaraco jaraco closed this as completed Oct 22, 2021
@jaraco jaraco added obsolete and removed Needs Discussion Issues where the implementation still needs to be discussed. labels Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants