Re: [Distutils] wishlist for setuptools
In a nutshell, here is what I want to be able to do: * Download several Python eggs into a directory, including multiple versions of some eggs. * Add that directory to sys.path at runtime. * Use pkg_resources.require() to select versions of the eggs. * 'import Foo' for each package "Foo". You can do all of the above now. Just use the -m option to easy_install when you eggs to the non-site directory, and make sure
At 08:19 AM 8/10/2008 -0500, Christopher Dunn wrote: that you add the directory to sys.path *before* importing pkg_resources. Or, if you can't do that, do this: pkg_resources.working_set.add_entry(directory_just_added_to_sys_path) This will allow pkg_resources to find eggs in that directory when you use require().
I hope that everyone takes this request seriously. The current system is almost completely broken for me. The only way I can use eggs is to add each one to sys.path explicitly at runtime.
My guess is that you're probably importing pkg_resources before you add your egg directory to sys.path. If not, please post code to show what you're doing. You should be able to do exactly what you specified above, without any changes to setuptools or pkg_resources.
participants (1)
-
Phillip J. Eby