[Tutor] Putting a Bow on It
Chip Wachob
wachobc at gmail.com
Mon Feb 18 08:41:25 EST 2019
Oscar,
Thanks for your full understanding of my situation. And putting it into
better words than I did.
The code that I've written is entirely Python. There are necessary
libraries that go along with that, and, due to my inexperience, I am not
100% certain they are pure Python or not. Some of the drivers from the IC
manufacturer (FTDI) are .dll files that get installed on the machine, and
I'm sure that's going to have to be a separate step.
I've been tooling around with PyInstaller over the last couple of days, and
it seems to be getting me closer to what I would like. Unfortunately, I
seem to have hundreds of 'missing' modules. I'm sure that something must
be missing because I can't launch the .exe file that is created. It looks
like it is going to run, then it comes up and says it can't execute the
script (not the exact words, but you get the idea). I'm just not sure how
to cull the 'necessary' modules from the ancillary ones.
I fear that once this is 'in the wild' that folks who don't have much / any
experience with Python will have a really hard time getting all the pieces
together. Maybe I'm over-concerned, but I've always liked to err on the
side of caution when it comes to 'anyone' being able to do something.
I'm also certain that the 'pros' out there are sitting and saying, 'this
isn't hard to do... he's being a ninny', but I'm really new to the
language, and feel fortunate that I've gotten to the point where I can
actually 'release' something.
One of the other posts, which I don't think I answered, asked about the
Python version. Since I have libraries that are locked at 2.7, that is
where I have to stay, and that means that some tools are already off the
table since they are for 3.3, etc.
I really appreciate the input from everyone here. With the pieces of
information you've offered, I've been able to make a little progress.
Best,
On Mon, Feb 18, 2019 at 8:27 AM Oscar Benjamin <oscar.j.benjamin at gmail.com>
wrote:
> On Mon, 11 Feb 2019 at 17:30, Alan Gauld via Tutor <tutor at python.org>
> wrote:
> >
> > Three is a lot of work going on in Python land but no universal
> > solution. Some things work better on particular platforms.
> > And building library packages is easier than complete applications.
>
> I think this is the basic problem. There has been a lot of progress in
> distributing libraries with pip, wheel etc. For an experienced
> programmer it's easy to set something up with pip and venv that gets
> you all the libraries you want. It's also pretty straight-forward to
> write a setup.py and use setuptools to build the wheels that pop can
> then install.
>
> Distributing applications is still problematic though and that's what
> Chip wants to do. In particular people often want to be able to do
> this in a single file hence py2exe, pyinstaller etc.
>
> But note that most professional software doesn't work that way.
> Normally a user can download a single file but that file will be the
> installer that then puts all the other files in position.
>
> > But for now, if you have more than a pure Python application,
> > you are pretty much stuck with building multiple solutions with
> > multiple tools.
>
> Chip is yours a pure Python application?
>
> If it is then my suggestion would be to ask your users (if using
> Windows) to install Python from the normal Python downloads page:
> https://www.python.org/downloads/
>
> Then you can give them a zipapp of your application:
> https://docs.python.org/3/library/zipapp.html
>
> I think if your zipapp has the .py extension and the shebang then it
> should be possible to double-click the file to run it on Windows (it's
> possible this depends on options ticked/unticked in the Windows
> installer - might need to be installed for all users).
>
> The advantage of this approach is that Python already has a
> well-maintained installer so you don't have to bother with that part
> yourself. It does mean that it's a two step-process for your users but
> once they have done the first step you can send them as many zipapps
> as you like and it should be fairly easy from there.
>
> I haven't actually tested all of these steps together properly though
> so there's a good chance if you try this that you will quickly
> encounter some difficulty...
>
> --
> Oscar
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list