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

recommended pytest-runner in setup_requires means packages fail to install often #3814

Closed
graingert opened this issue Aug 14, 2018 · 2 comments
Labels
type: docs documentation improvement, missing or needing clarification

Comments

@graingert
Copy link
Member

graingert commented Aug 14, 2018

The recommendation to add pytest-runner to setup_requires means that all users of that package end up with an unnecessary pytest-runner package installed. This is bad because it bypasses pip hashes and --trusted-host

https://docs.pytest.org/en/latest/goodpractices.html#integrating-with-setuptools-python-setup-py-test-pytest-runner

MechanicalSoup/MechanicalSoup#224
rxcomm/pyaxo#26
jpadilla/pyjwt#179

@graingert graingert changed the title recommended pytest-runner in setup_requires means packages fail recommended pytest-runner in setup_requires means packages fail to install often Aug 14, 2018
@graingert
Copy link
Member Author

Going foward it's probably better to recommend only the conditional requirement https://github.com/pytest-dev/pytest-runner#conditional-requirement

@Zac-HD Zac-HD added the type: docs documentation improvement, missing or needing clarification label Oct 20, 2018
@Zac-HD
Copy link
Member

Zac-HD commented Oct 20, 2018

I agree - that section should at least discuss the downsides of using pytest-runner.

IMO we should present the manual option first, then discuss how this bypasses standard packaging tools, advise against it for libraries, and finally point to pytest-runner as a quick way to set this up for applications that can afford the extra dependency and may want to use setup.py-based testing.

koobs added a commit to koobs/pynvim that referenced this issue Dec 20, 2019
pytest runner should not be unconditionally included in setup_requires

This change makes it conditional on setup.py invocation arguments as recommended upstream [1]

See: pytest-dev/pytest#3814

[1] https://pytest-runner.readthedocs.io/en/latest/#conditional-requirement
justinmk pushed a commit to neovim/pynvim that referenced this issue Jan 10, 2020
pytest runner should not be unconditionally included in setup_requires.
This change makes it conditional on setup.py invocation arguments as recommended upstream [1].

See: pytest-dev/pytest#3814

Identified via: [FreeBSD Ports Bug 242065](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242065)

Closes #417
Closes #420

[1] https://pytest-runner.readthedocs.io/en/latest/#conditional-requirement
andrew-propelauth added a commit to PropelAuth/propelauth-flask that referenced this issue Feb 22, 2023
andrew-propelauth added a commit to PropelAuth/propelauth-py that referenced this issue Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs documentation improvement, missing or needing clarification
Projects
None yet
Development

No branches or pull requests

2 participants