[Python-Dev] Packaging and binary distributions for Python 3.3

Paul Moore p.f.moore at gmail.com
Thu Oct 13 20:30:01 CEST 2011


On 13 October 2011 17:25, Éric Araujo <merwok at netwok.org> wrote:
>> 1. By using setup.cfg technology, it would be easy enough to zip up a
>> binary build in a way that pysetup could unpack and install.
> Correct.  I’m still pondering whether I find the idea of registering
> built files in setup.cfg as elegant or hacky :)  We also have the other
> ideas I wrote to choose from.

To be honest, I think I prefer the idea of taking the bdist_wininst
code which creates a zipped distribution archive with "special" root
directories like PLATLIB, and use it to create a bdist_simple
(basically, by removing some of the code to prepend the EXE stub).
Then teach pysetup install to install that file format.(likely by just
plugging in a new function into install_methods). The benefit is that
bdist_wininst installers can be consumed unaltered by this install
method. [1]

Vinay's suggestion of registering the built files in setup.cfg sounds
attractive, as the code is already there, but it seems like it'd just
move the complexity from the install code to the process of building
the bdist_simple archive.

>>    1a. A packaging command to build such an archive would be worth providing.
> Definitely.  Maybe we could also decide on one of wininst or msi?

I was thinking of a new bdist_simple archive format, which is
platform-agnostic. bdist_wininst is a compatible superset restricted
to the Windows environment, so promoting bdist_wininst over bdist_msi
for people who prefer GUIs and platform integration would make sense.

>> 2. A GUI installer would still be valuable for many people
>>    2a. Having the GUI work by doing a pysetup install passing the
>> installer exe (which would have a zipfile as noted in 1 above
>> appended) could make sense to avoid duplicating work.
> Yes.

Or having bdist_wininst usable by pysetup install directly (because
it's a bdist_simple compatible format)...

>>    2b. The GUI could do the extra needed to integrate with the OS,
>> which pysetup wouldn't do
> Nice property.

And already present with bdist_wininst.

>>    2c. There's a question over a GUI install followed by a pysetup
>> uninstall, which wouldn't remove the add/remove entry...
> I think we could require that a project installed with a clicky
> wininst_bdist has to be removed via the Add/Remove GUI.  (There is
> support for that in PEP 376: the INSTALLER file.)

Agreed - and if pysetup install works with bdist_wininst files, the
user can choose whether to use a pysetup or a GUI install (and
consequently which approach to management/uninstall they prefer).

>> 3. Ideally, the GUI should co-operate with venvs, by offering some
>> form of browse facility. The command line does this automatically.
> Will Windows users want a GUI to create venvs too?

Quite possibly some will. Personally, I don't. And given that
virtualenv has managed OK without a GUI interface, I'd say let's
assume it's YAGNI for now.

[1] Actually, based on the above, I think the pysetup install method
that consumes bdist_wininst files as if they were just bdist_simple
archives (i.e., assuming the bdist_simple format takes that layout)
would be useful even if bdist_simple is never implemented. The
bdist_simple version makes the same facilities available for
non-Windows users, if they want it. I think I'll look at coding that
option, and see where it takes me.

Paul.


More information about the Python-Dev mailing list