On 25 August 2013 10:58, Vinay Sajip <vinay_sa...@yahoo.co.uk> wrote:

> Nick Coghlan <ncoghlan <at> gmail.com> writes:
>
> > 1. An option (or options) to pip, telling it to just drop a wheel file
> > (or the unpacked contents of the wheel as a directory) into
> > site-packages instead of installing the distribution directly as the
> > default version. The "root_is_purelib" setting in the wheel metadata
> > would indicate whether the destination was purelib or platlib. A wheel
> > installed this way wouldn't have script wrappers generated, etc - it
> > would only allow the contents to be used as an importable library.
>
> ISTM you would still need path-munging for this to work, or is there some
> other way?
>

Essentially, that is my question - and I'd like to know what Nick's
proposal is here because I am not happy with the existing pkg_resources
solution of using .pth files. I know there's a new feature being discussed
on import-sig which may replace the need for pth files, but I don't want to
see pth files being needed if that isn't available. Specific reasons I have
for this:

1. The extra sys.path entries that get added (not for performance reasons,
but because having a long sys.path is difficult for the interactive user to
interpret when trying to see what's going on).
2. The whole "if I'm not in a site packages directory I won't work" issue
3. Questions of where things go on sys.path (if it depends on the order you
"declare" things, it gets nasty when there are name clashes)

The other thing I want to understand is how things would work if, for
example, I wanted to use CherryPy 3 99% of the time, but occasionally
needed CherryPy 2. Could I install CherryPy 3 as a normal (not
multi-versioned) package, and then override it when needed? So only
applications needing CherryPy 2 had to declare a version requirement?

More generally, how does a project choose whether to use run-time
multi-versioning, vs metadata declaring a dependency for install time? Why
would I ever write code that uses a run-time dependency on CherryPy 2,
rather than saying in my metadata "requires: CherryPy = 2"? Or conversely
why would I ever declare an install-time dependency rather than declaring
my requirements at runtime "because that's more flexible"?

Paul
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to