-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Q: pex support? #2038
Comments
@trivigy You can also try https://github.com/google/subpar. |
Just use |
@meteorcloudy Good to know! |
@pcj Thanks for the recommendation. Loved learning about a new cool think I didn't see online. Unfortunately this is quite similar to --build_python_zip which is simply a zipped executable python module. @meteorcloudy I definitely know about that one but unfortunately that feature is simply not enough for what I am looking. I want the ability to embed a venv inside the python executable archive. I have been messing around with creating my own rule for the past entire week and, now that I actually understand how the whole thing works, almost finished making my own pex rule. The idea behind this is a two fold. Foremost, python programs have dependencies on other python modules. By using pex that dependency is resolved and makes it significantly easier to actually distribute python applications. On the other hand, python applications also have system dependencies and for that I think bazel is pretty well equipped. Hopefully I'll be able to wrap the python executable into a *.deb package that will contain all of the system dependencies. This way when the application is installed, all of the dependencies get resolved with it. When I get it running I'll be happy to share the rule. And would love some advise if you think there are things I should be considering as I am building this. |
@meteorcloudy Maybe you could help. Is there a way to produce the zipped executable ( |
Okay never mind. I figured it out. 💡 |
Is there anything left here for us to do? Can we close this? |
I ended up writing a full rule for pex. You can find it here: #699. It would still be really nice if this rule was part of the bazel master and came in with the official distribution. |
Not sure if this has been asked in the past but will bazel ever consider implementing pex file support build for python? I was able to find only two references to those and have been struggling getting them to work with the current version of bazel.
https://github.com/saileshmittal/bazel/tree/pex
https://github.com/benley/bazel_rules_pex
The text was updated successfully, but these errors were encountered: