<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Because my proposal back in 2010 [1] and
Richard Jones's PEP-439 [2] from 2013 were about the same thing -
bootstrap script to get latest version of package management tool, and
were rejected, I'd like to discuss the concept of mini-pip separately,
as I believe not all points were addressed.<br><br><div class="gmail_extra">Let's define what a mini-pip is. When pip is not installed:<br><br></div><div class="gmail_extra"> $ python -m pip install django<br></div>
<div class="gmail_extra"> pip package management tool is not installed on this system.<br> Would you like to download and install pip first? [Yn] Y<br> ...<br></div><div class="gmail_extra"> pip version x.x.x is installed successfully.<br>
</div><div class="gmail_extra"> Removing pip bootstrap script.<br></div><div class="gmail_extra"> Done installing pip.<br><br></div><div class="gmail_extra"> Proceeding with 'install django'.<br> ...<br></div>
<br><div class="gmail_extra">mini-pip
is the human name for pip.py module that is bundled with Python. It is
packaged as pip.py to allow users do 'python -m pip'. This script does
two things:<br><br></div><div class="gmail_extra"> 1. informs users that pip is not installed<br></div><div class="gmail_extra"> 2. proposes to install pip and does this stuff if user agrees<br><br></div><div class="gmail_extra">
Algorithm is the following:<br><br></div><div class="gmail_extra"> 1. Start<br></div><div class="gmail_extra"> 2. Propose<br></div><div class="gmail_extra"> 3 Download or 4 Exit<br></div><div class="gmail_extra"> 3.1 Check server certificate<br>
</div><div class="gmail_extra"> 3.2 Check package signature<br></div><div class="gmail_extra"> 3.3 Unpack<br></div><div class="gmail_extra"> 3.4 Run python setup.py install<br></div><div class="gmail_extra"> 3.5 Remove itself<br>
</div><div class="gmail_extra"> 3.6 Continue to run user command<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">* When pip.py is removed, "python -m pip" will start serving from pip/__main__.py<br>
</div><div class="gmail_extra">* PEP 439 was rejected, because bootstrap script didn't ask user for permission, this proposal includes that<br></div><br></div><div class="gmail_quote">More issues are below:<br></div>
<div class="gmail_quote">
<br>On Sun, Sep 15, 2013 at 11:02 PM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="word-wrap:break-word"><div><div class="h5"><div><div>On Sep 15, 2013, at 3:56 PM, Alex Burke <<a href="mailto:alexjeffburke@gmail.com" target="_blank">alexjeffburke@gmail.com</a>> wrote:</div><blockquote type="cite">
<div>Instead of a copy of pip, could there not be minimal code to simply fetch the wheel and install that or perhaps even use it directly (a la what was possible with eggs)?</div></blockquote></div></div></div><div>Basically three reasons:</div>
<div> - There's a lot of code to handle a variety of situations in pip, it would</div><div> be much harder to extract this code and keep it up to date in a way</div><div> that the "mini pip" could use it. It would also not be as battle worn as</div>
<div> the pip code.</div></div></blockquote><div><br><div class="gmail_extra"><div class="gmail_extra">mini-pip doesn't need share or import anything with pip - it is a standalone bootstrap script, the basic parts of which - certificate checking, downloading, unpacking - should already be available from stdlib, so it is no different from shell script or any other system script except that it is cross-platform.<br>
<br><div class="gmail_extra">There is no "variety of situations" in mini-pip - it doesn't do any argument processing, postponing it to the phase when main pip library can take the flag.<br></div></div></div>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div> - On top of the one time cost there is the ongoing cost. As the packaging</div>
<div> ecosystem progresses the stdlib implementation will need to be kept</div><div> up to date as well as the pip code.</div></div></blockquote><div><br></div><div>pip code, yes, but not mini-pip bootstrap script. All it ever needs is a location of main pip package and it's signature.<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div> - We need to include a copy of pip in order to support offline installs either</div>
<div> way. Since we have the private copy there to support offline we might as</div><div> well use it to handle everything.<br></div></div></blockquote><br></div>Offline installation is not an option - bootstrap script is for
bootstrapping and it requires "external media" with the rest of
"operating system" to be present.<br><br>1. <a href="https://mail.python.org/pipermail/distutils-sig/2010-March/015894.html">https://mail.python.org/pipermail/distutils-sig/2010-March/015894.html</a><br>2. <a href="http://www.python.org/dev/peps/pep-0439/">http://www.python.org/dev/peps/pep-0439/</a><br clear="all">
<div>-- <br>anatoly t.</div>
<br></div></div>