-
Notifications
You must be signed in to change notification settings - Fork 571
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_import / requirement() does not work for the pypi azure package #273
Comments
Can you please post the actual error you get? At work we were trying to use the Snowflake connector package, which pulled in an Azure storage package which didn't work. We addressed the issue in this project https://github.com/dillon-giacoppo/rules_python_external. We now use that alternative packaging solution at work. You can see here my original comment in another issue talking about having a problem with an Azure package: #93 (comment) |
Thanks for asking. I do not get an error until the import in my python code fails. Bazel does not report any issues. To explain more fully, my project requires Python 3.7 language features, so I had to get Bazel to install 3.7 (which I got to work, using code from a distroless example), but Bazel pip_import cannot currently target this install. In order to get past that hurdle, I used rules_docker's py_layer to build a layer which only contains my external dependencies, azure among them. My py_image includes this layer, and it all seems to hold together. I can verify my version and the existence of the code for every library I list as a requirement() in my py_layer deps /except/ azure. Also, since I can grep the layer manifest I can see that Bazel does not attempt to include any Python code from azure, just
Other libraries have lots of code in the manifest. Further, since I can untar the layer, i can see all the other libraries actually exist, or at least their init.py does. There is no mention of the azure package at all in the untarred layer. |
Yes that's consistent with the behaviour I saw. As Python isn't compiled the import errors will only show up at runtime.
I don't think this is true. Would you consider trying With
All of those work. |
|
Good to hear. You can PM me in the |
Following this problem step by step, I finally got images building with Python 3.7 and all of my dependencies, but I'm now getting errors when Python starts:
This did not happen when I was building stock py_image Python 3.5 images. Any guesses? |
I'd guess that an environment variable that tells the library which local encoding to use. Something like This problem is I think out of scope of this Github Issue though. Feel free to ping me in the Bazel Slack. |
rules_python adopted rules_python_external, so azure now works fine with the |
Hello.
The official azure package does not install correctly using bazel pip_import / requirment rules. My project loads a dozen libraries via pip_import and py_library / deps.
They all import successfully except azure.
The Pypi azure readme says that it installs no code itself but rather includes a list of other packages. I assume Bazel doe not cover this case.
I am using the lastest revs of every Bazel package I use. I can provide my WORKSPACE and BUILDs if it will help but this seems to be a pretty clear, isolated case.
Any workarounds or fixes would be welcome.
The text was updated successfully, but these errors were encountered: