-
Notifications
You must be signed in to change notification settings - Fork 551
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
Flask import breaks on OSX #17
Comments
It looks like this starts working once |
Ok, I think I understand the error now, but not sure how to fix. Normal installation of the /usr/bin/python -u -c "..." bdist_wheel -d ... However, because we don't have I'm not sure how this would work in a @duggelz I'd appreciate your thoughts on this (no rush). |
@duggelz if you are around, I'd appreciate any thoughts you might have in this space. |
Here's where this is configured in |
The "extensions": {
"python.commands": {
"wrap_console": {
"wheel": "wheel.tool:main"
}
},
"python.details": {
"contacts": [
{
"email": "[email protected]",
"name": "Daniel Holth",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst",
"license": "LICENSE.txt"
},
"project_urls": {
"Home": "https://bitbucket.org/pypa/wheel/"
}
},
"python.exports": {
"console_scripts": {
"wheel": "wheel.tool:main"
},
"distutils.commands": {
"bdist_wheel": "wheel.bdist_wheel:bdist_wheel"
}
}
}, |
Watching this crazy video on how |
I think this comes down to: from pkg_resources import iter_entry_points
for entry_point in iter_entry_points(group='distutils.commands', name=None):
print(entry_point) Which should show:
|
Exploring this in a Bazel context ( Interestingly |
Hmm, within the context of the ws = pkg_resources.WorkingSet()
for dist in ws:
print str(dist) ... to the test, I get the right I'll try putting this into a PAR, and if all else fails having that PAR invoke a little python script. |
Woof, so this is If you clone the $ bazel run examples/par:list_resources
...
INFO: Running command line: bazel-bin/examples/par/list_resources
pip 9.0.1 <-- what I bundled
wheel 0.30.0a0 <--
...
$ bazel run examples/par:list_resources.par
...
INFO: Running command line: bazel-bin/examples/par/list_resources.par
...
pip 1.5.4 <-- system installed version
... |
@duggelz Is this something we could maybe fix in our |
It looks like the logic in |
This is blocking the addition of several Python samples, including the http one and the TODO controller. The cause is tracked by [this](bazelbuild/rules_python#17) and [this](google/subpar#38) issue. Currently Bazel CI doesn't provide very meaningful coverage, most of it happens via Travis and example e2e tests.
After various futile attempts, I think the only reasonable way to make this work is to have the .par file unpack itself at runtime. |
@duggelz What's left, this seems to work for me in the |
I haven't tried Flask, but I was hitting this on the |
The only thing left is to add a good e2e test where we explicit create virtualenvs with various problems and run bazel inside them. But we effectively already get that by running on different OS's :) |
Will close this, as the last comment was over 3 years ago and in the interim time the |
You can see it in the Bazel CI job here
The text was updated successfully, but these errors were encountered: