[Distutils] Local version identifiers from PEP 440 in practice

Ethan Furman ethan at stoneleaf.us
Wed Dec 17 04:25:55 CET 2014


On 12/16/2014 06:48 PM, Donald Stufft wrote:
> 
> Now if you have 1.3+debian1 installed via apt-get (or any means really), and you’ll get the following behaviors (show with pip):
> 
> - pip install yourthing -> 1.3+debian1 satisfies the constraint of anything, so it stays installed.
> - pip install yourthing==1.3 -> 1.3+debian1 satisfies the constraint of ==1.3, so it stays installed.
> - pip install yourthing>=1.3 -> 1.3+debian1 satisfies the constraint of >= 1.3, so it stays installed.
> - pip install yourthing>=1.4 -> 1.3+debian1 does not satisfy the constraint of >=1.4, so pip will upgrade it to 1.4.
> - pip install —upgrade youthing -> You’ve requested an upgrade, so pip will see 1.4 exists and will install it.
> - pip install —upgrade yourthing==1.3 -> You’ve requested an upgrade, but there’s nothing newer than 1.3+debian1 that matches the constraint so it stays installed
> - pip install -upgrade youthing>=1.3 -> You’ve requested an upgrade, pip will see 1.4 exists and satisfies the constraint and will install it.
> - pip install —upgrade yourthing>1.4 -> you’ve requested an upgrade and 1.3+debian1 is not >= 1.4, so pip will see 1.4 exists and install it.
> 
> Does that make sense?

Yes.  Thank you for that _very_ thorough explanation.  :)

To continue with Maurits' use-case, in order to get /exactly/ 1.3, '===' is the operator to use?  Or are we still
discussing that?  Personally, I think

  pip install yourthing is 1.3

;)

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20141216/8f111900/attachment-0001.sig>


More information about the Distutils-SIG mailing list