[Python-ideas] More "ensure*" packages
Steve Dower
steve.dower at python.org
Thu Aug 13 22:52:00 CEST 2015
On 13Aug2015 1332, Andrew Barnert wrote:
> On Aug 13, 2015, at 10:06, Steve Dower <steve.dower at python.org> wrote:
>>
>> From my point-of-view, this has been very successful in Python 2.7, 3.4 and will also be successful in 3.5. For Python 3.6, I'd like to do a similar thing with:
>>
>> * requests
>> * tkinter (including tcl/tk, IDLE, and other dependencies)
>
> Is the latter actually doable?
I believe so, but I'm only really familiar with how we currently
distribute it on Windows.
> Can tkinter be packaged in such a way that it includes or downloads or (best of all) downloads only if changed an entire Tcl/Tk installation (without affecting any other Tcl/Tk installations)?
_tkinter.pyd (on Windows) links directly against Tcl and Tk's binaries,
and while theoretically the version of Tcl/Tk being used could be
replaced, I'm not aware of anyone doing this or even whether it works.
It's certainly not trivial, because our tcl and tk binaries are
installed right next to _tkinter, so you need to break your own
installation in order to do it.
My idea was that whichever part of the package includes _tkinter would
also include the matched version of Tix, Tcl and Tk. There may be some
issues arise out of that (beyond breaking people who assumed these files
would never move) - I haven't done a full investigation yet.
I do know there are some environment variable settings that can cause
problems. As I understand it, nobody should be importing anything other
than `tkinter`, which means we have a chance to resolve those easily,
but a change like this would be very likely to break people who aren't
using the public documented interfaces. (I'm totally okay with breaking
them, BTW, and this would be a 3.5->3.6 change, not 3.5.1.)
> And, besides the technical question, at least on OS X we recommend ActiveTcl; does their weird licensing allow Python to just download and install that automatically?
If we're currently downloading and installing that automatically, then
yes (or at least I'd assume so). If we're not, then we will continue to
not do it.
> And, even if that is possible, does that mean I'll end up with 27 copies of ActiveTcl on my laptop (one for each Python and each virtual env) plus Apple's Tcl, instead of the 1 copy I installed manually?
I'd expect not. If a separate install is a valid setup, then I'd expect
that to continue to be the case. But as I say, I'm most familiar with
Windows where that isn't something you can do.
Cheers,
Steve
> With a 30MB download for each one?
>
> If all of those are easily solved, then this seems like a cool idea.
>
More information about the Python-ideas
mailing list