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

pip dependencies name conflict #275

Closed
liuyl opened this issue Jan 27, 2020 · 4 comments
Closed

pip dependencies name conflict #275

liuyl opened this issue Jan 27, 2020 · 4 comments

Comments

@liuyl
Copy link

liuyl commented Jan 27, 2020

Consider a py_binary target has

deps = [
    requirement("google-auth"),
    requirement("google-cloud-storage")
]

Both google-auth and google-cloud-storage package have top level directory google, which causes conflict.
import google.storage will complain about no module named google.storage because python is trying to find storage module in the google-auth package's google directory.

Wonder has anybody else had this issue, and how to resolve it?

@thundergolfer
Copy link
Collaborator

thundergolfer commented Jan 27, 2020

This is a duplicate of #65. Yep, a lot of us have had this issue 😅. It's also a problem for the azure.* packages (#273, #93).

These are long standing issues, so we fixed this problem over in https://github.com/dillon-giacoppo/rules_python_external and now use that at work. ✅

@thundergolfer
Copy link
Collaborator

There's also https://github.com/ali5h/rules_pip and https://github.com/apt-itude/rules_pip which I think also handle this problem. The latter might not be actively maintained though.

@liuyl
Copy link
Author

liuyl commented Jan 29, 2020

@thundergolfer indeed, thanks for the pointer to other related bugs and the solution! will try rules_python_external.

@thundergolfer
Copy link
Collaborator

Closing as duplicate of #93 and #65

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

2 participants