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

pytest-runner in test_requires and setup_requires #179

Closed
mbultrow opened this issue Oct 7, 2015 · 4 comments
Closed

pytest-runner in test_requires and setup_requires #179

mbultrow opened this issue Oct 7, 2015 · 4 comments

Comments

@mbultrow
Copy link

mbultrow commented Oct 7, 2015

I'm having problems with distributing my app to an offline environment because of pytest-runner in setup_requires.
I doesn't seem like pytest is necessary for installation itself, so I don't want to be forced to package it with my application.

Can you just remove the reference, or am I missing something?

mark-adams added a commit to mark-adams/pyjwt that referenced this issue Oct 7, 2015
@mbultrow
Copy link
Author

mbultrow commented Oct 7, 2015

Wow, I see that there's already a fix waiting - nice!
I've also found this interesting statement, that setup_requires is really kind of incompatible with pip. Is it necessary at all in PyJWT's case?

@mark-adams
Copy link
Contributor

Hmmm... I'm not sure where they're getting that from.

I just ran "pip install pyjwt" on a clean install and got the following:

$ pip install pyjwt
Collecting pyjwt
  Downloading PyJWT-1.4.0-py2.py3-none-any.whl
Installing collected packages: pyjwt
Successfully installed pyjwt-1.4.0

$ pip freeze
PyJWT==1.4.0
wheel==0.24.0

Looks like it doesn't install pytest-runner as that post would suggest and doesn't appear to have any problems with pip

mark-adams added a commit to mark-adams/pyjwt that referenced this issue Oct 9, 2015
mark-adams added a commit that referenced this issue Oct 9, 2015
Made pytest-runner installation in setup.py conditional. Fixes #179
@mbultrow
Copy link
Author

Sorry for not responding quickly, I was on vacation (those happen), but this needs to be reopened.
Pip install doesn't install pytest-runner, but wants it to run it's egg_info.

To reproduce my problem do this:

$ mkdir vendor
$ pip install --download vendor pyjwt --no-binary=:all:
# clear pip's cache
$ rm -rf $HOME/.cache/pip/*
# now turn off your Internet connection
$ pip install pyjwt --no-index --find-links=vendor/

I've worked around it by using PyJWT's wheel, but that forced me to separate my requirements files, because I need some of dependencies (like cryptography) in source form to be multi-platform.

Also, take a look at this excerpt from pip's documentation: https://pip.readthedocs.org/en/stable/user_guide/#ensuring-repeatability

@ysgard
Copy link

ysgard commented Sep 27, 2016

This bug has bit me too. It's bothersome because even if you provide pytest-runner on an internal pip server, PyJWT ignores it and tries to install pytest-runner from the internet.

Thanks @mbultrow for the suggestion about separate requirements files for pre-installing deps - that seems like a decent workaround.

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

No branches or pull requests

3 participants