-
Notifications
You must be signed in to change notification settings - Fork 386
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
Dependency that is only compatible/needed with/in python 2 in setup.py #147
Comments
This is working for me on my OSX yosemite machines, and it has not caused in the travis linux (debian, i think) builds. Can you give me some more details about your system? |
also, can you clarify what the of this issue means? |
|
ah, probably just needs something like this: # setup.py
install_requires = ['somelib1', 'somelib2']
try:
import collections
except ImportError:
install_requires.append('backport-collections')
setup(
...
install_requires=install_requires,
...
) |
Ya, something like that could work. Either that or checking the python version and using that to append. |
yeah but then the question is: why isn't this failing in travis? |
The install technically succeeds, I'm guessing other protections protect the tests from importing this lib. |
Maybe travis's |
you should use: extras_require = {
':python_version<=2.4': ['contextlib2',],
':python_version<=2.6': ['backport_collections',],
':python_version<=3.2': ['mock'],
} in the setup.py |
ah nice didnt know that you could do that. Why ':python_versioin<=3.3': ['mock'] ? I just used mock in python 3.4
And things worked fine. |
You're supposed to use unittest.mock on python 3.3+ |
use conditional requirements for backport libraries closes #147
fixes #146 A better (more involved) solution might be to check for a TensorFlow installation manually in setup.py and deal with that accordingly.
this causes pip install to fail (at least with my py3.4 system)
The text was updated successfully, but these errors were encountered: