<div dir="ltr">OK, I'm really confused here:<div><br></div><div>1) what the heck is so special about go all of a sudden? People have been writing and deploying single file executables built with C and ++, and whatever else? forever. (and indeed, it was a big sticking point for me when I introduced python in my organization)</div><div><br></div><div>2) Why the sudden interest in this as core a Python issue? I've been using Python for desktop apps, on primarily Windows and the Mac for years -- and had to deal with py2exe, py2app, etc. forever. And it has been a very very common question on the various mailing lists for ages: how do I deploy this? how do I make it easy to install? The answer from the developers of cPython itself has always been that that's a third party problem -- and go look for py2exe and friends to solve it. And that it is a solved-enough problem. The biggest "unsolved" issues are that you get a really big application. </div><div><br></div><div>Don't get me wrong -- I've wanted for years for it to be easier to deploy python-based apps as a single thinking for users to easily install and uninstall where they don't need to know it's python -- but what the heck is different now?</div><div><br></div><div>3) There was mention of a platform-neutral way to do this. Isn't that simply impossible? The platforms are different in all the ways that matter for this problem: both technical differences, and conventions. Which isn't to say you couldn't have one API to produce a single "thing" executable, so it would look like one solution for multiple platforms to the user. But the end product should be (would have to be) a different beast altogether.</div><div><br></div><div>And doesn't PyInstaller already provide that (may it can't do single-file...)</div><div><br></div><div>Anyway -- if there really is a new interest in this problem such that people will put some time into, here are some thoughts I've had for ages:</div><div><br></div><div>The big one is Separation of concerns: in order to build a single "thing" executable, you need three things:</div><div> a) An API to for the developer to specify what they want</div><div> b) Figure out what needs to be included -- what extra modules, etc.</div><div> c) A way to package it all up: App bundle on the Mac, single file executable on Windows (statically linked? zip file, ???)</div><div><br></div><div>That third one -- (c) is inherently platform dependent -- and there "is more than one way to do it" even on one platform. But it sure would be nice if the API between a) b), and c) could be unified so we could mix and match different implementations.</div><div><br></div><div>And, of course, if cPython itself could be built in a way that makes step(c) easier/less kludgy great!</div><div><br></div><div>-Chris</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 28, 2015 at 9:54 AM, Donald Stufft <span dir="ltr"><<a href="mailto:donald@stufft.io" target="_blank">donald@stufft.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On May 28, 2015 at 12:24:42 PM, Chris Barker (<a href="mailto:chris.barker@noaa.gov">chris.barker@noaa.gov</a>) wrote:<br>
> I'm confused:<br>
><br>
> Doesn't py2exe (optionally) create a single file executable?<br>
><br>
> And py2app on the Mac creates an application bundle, but that is<br>
> more-or-less the equivalent on OS-X (you may not even be able to have a<br>
> single file executable that can access the Window Manager, for instance)<br>
><br>
> Depending on what extra packages you need, py2exe's single file doesn't<br>
> always work, but last I tried, it worked for a fair bit (I think all of the<br>
> stdlib).<br>
><br>
> I don't know what PyInstaller or others create. And I have no idea if there<br>
> is a linux option -- but it seems like the standard of practice for an<br>
> application for linux is a bunch of files scattered over the system anyway<br>
> :-)<br>
><br>
> Yes, the resulting exe is pretty big, but it does try to include only those<br>
> modules and packages that are used, and that kind of optimization could be<br>
> improved in any case.<br>
><br>
> So is something different being asked for here?<br>
<br>
</span>All of those solutions “work” to varying degrees of work, almost all of them rely<br>
on hacks in order to make things “work” because the ability to do it isn’t built<br>
into Python itself. If the critical pieces to execute in this way was built into<br>
Python itself, then those tools would work a whole lot better than they currently<br>
do.<br>
<span class=""><br>
><br>
> Barry Warsaw wrote:<br>
> >> I do think single-file executables are an important piece to Python's long-term<br>
> competitiveness.<br>
><br>
> Really? It seems to me that desktop development is dying. What are the<br>
> critical use-cases for a single file executable?<br>
<br>
</span>The desktop isn’t dying, Mobile is becoming a very important thing of course,<br>
but that’s just because people are using devices *more* to account for the<br>
use of Mobile, they aren’t really using their Desktop’s less.<br>
<br>
See: <a href="http://blogs.wsj.com/cmo/2015/05/26/mobile-isnt-killing-the-desktop-internet/" target="_blank">http://blogs.wsj.com/cmo/2015/05/26/mobile-isnt-killing-the-desktop-internet/</a><br>
<span class=""><br>
><br>
> And I'd note that getting a good way to use Python to develop for iOS,<br>
> Android, and Mobile Windows is FAR more critical! -- maybe that's the same<br>
> problem ?<br>
><br>
<br>
</span>It’s not the same problem, but it’s also not very relevant. Volunteer time isn’t<br>
fungible, you get what people are willing to work on regardless of whether it<br>
will help Python as a whole. It’s also not an either/or proposition, we can both<br>
improve our ability to develop under iOS/Android/etc and improve our ability to<br>
handle desktop applications.<br>
<div class="HOEnZb"><div class="h5"><br>
---<br>
Donald Stufft<br>
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R (206) 526-6959 voice<br>7600 Sand Point Way NE (206) 526-6329 fax<br>Seattle, WA 98115 (206) 526-6317 main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div>