Author paul.moore
Recipients Andi Bergmeier, paul.moore, r.david.murray, steve.dower, tim.golden, zach.ware
Date 2017-02-08.17:36:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
OK, well I certainly wouldn't bother supporting users trying to provide the path to an embedded distribution of Python. That's not what the distribution is for, and as the author of Bazel you'd be perfectly OK (IMO) to say you don't support that.

If you want to supply an embedded distribution with Bazel, and deploy it with the application, that's fine - in that case you can modify the _pth file when you copy the distribution to deploy it.

If you want to share the embeddable distribution that is installed with Bazel among multiple user scripts that get deployed, then I'd suggest deploying a wrapper script with the user's code. That wrapper could set sys.path then run the user's script (using the stdlib runpy module, maybe). You mention that option, but say it's "not as nice as having a direct command-line switch" - but while that may be true (I disagree, but it's a matter of opinion) surely the fact that there *is* no such command line switch makes that consideration irrelevant?

Also, I'm not sure how your original question (how you can distinguish an embeddable distribution from a normal one) would help here anyway. FWIW, if you really had to, you could do that by looking to see if there was a _pth file in os.listdir(sys.prefix)). That would be a plausible heuristic, but certainly not something I'd recommend as a robust solution.
Date User Action Args
2017-02-08 17:36:08paul.mooresetrecipients: + paul.moore, tim.golden, r.david.murray, zach.ware, steve.dower, Andi Bergmeier
2017-02-08 17:36:08paul.mooresetmessageid: <>
2017-02-08 17:36:08paul.moorelinkissue29503 messages
2017-02-08 17:36:08paul.moorecreate