-
Notifications
You must be signed in to change notification settings - Fork 19
difference between pyz_binary and pyz_image #35
Comments
Hrm... Interesting. Just to make sure I understand: the local In general: this probably means it is either setting PYTHONPATH incorrectly, or it has packaged the files in the wrong locations. |
I ran into the same problem with pyz_library(
name = "lib",
srcs = [
"example.py"
],
deps = [
"//third_party/pypi:github3.py",
],
)
pyz_binary(
name = "main",
srcs = [
"main.py",
],
deps = [
":buildlib",
],
)
pyz3_image(
name = "main_image",
binary = ":main",
) Adding |
Ah thanks for this bug report. I think I might know what is going wrong here. For clarity, @ewhauser were these rules in the root of your |
Mine were in a subdirectory. I had a lot of problems with the PYTHONPATH using |
Hrm weird, thanks. I'll see if I can manage to reproduce this somehow ... If you see it again, a standalone git repository that demonstrates the issue means I can definitely figure out how to fix it :) |
I was trying to get a legacy app working with these rules (I have not written it myself, it uses Django's manage.py) and to get things working I had to add
pythonroot="."
to my python libraries (otherwise libraries could not be imported). But now running the app in docker via thepyz3_image
complained that it could not import a library, specifically theDJANGO_SETTINGS_MODULE
. Now I additionally added this library without thepythonroot
settings and now it works.I am sorry I can not give more details at this stage I thought I would just report it and if I have more time to investigate I can add more here. I am wondering though if there is a slight difference in the directory layout, or maybe where the process is being executed compared to the runfiles dir locally?
The text was updated successfully, but these errors were encountered: