[TIP] tox vs buildout

Carl Meyer carl at oddbird.net
Tue Dec 20 12:29:25 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/20/2011 01:12 PM, holger krekel wrote:
> On Tue, Dec 20, 2011 at 17:04 +0000, Chris Withers wrote:
>> It appears that the pip installation tox uses will only pick
>> released packages, while easy_install picks beta releases. I use
>> stuff in Mock 0.8.0bx, how can I get that package to be used by tox?
> 
> No clue.  Maybe pip has an optional similar behaviour?
> If so we could use it by default.

Pip does not prefer "released packages" to beta releases; it has no
algorithm for telling the difference. What's happening here is that
mock's download page includes this link:

http://www.voidspace.org.uk/downloads/mock-0.8.0beta4.tar.gz#egg=mock-dev

The sdist filename here claims that this is mock version 0.8.0beta4, but
the #egg fragment claims that it is mock version "dev". It seems that
easy_install gives the filename preference, whereas pip gives preference
to the explicit fragment.

You can get pip to install this version by requesting "mock==dev".

If Michael makes available another link to that tarball without the egg
fragment, pip would be able to find it as "0.8.0beta4" - this would also
have the effect that it would be considered the latest version available
and thus installed by default (like easy_install does), which may not be
what he wants.

Alternatively, to prevent easy_install from considering it the
latest/default version, he could rename the sdist tarball so it can't be
interpreted as a version by easy_install.

Carl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7w8CUACgkQ8W4rlRKtE2cs4wCfU726yo9taCNUAqld5VAKwZ7a
r+IAoOOgJSIXJXGzRr6LOR2O/v/y9oZS
=IQUL
-----END PGP SIGNATURE-----



More information about the testing-in-python mailing list