On 10/31/2011 11:49 AM, Andrea Crotti wrote:
On 10/27/2011 06:17 PM, PJ Eby wrote:
Properly reloading changed code is a lot more complex than that.

Ah well it would be nice maybe but it's not so important, and maybe even Envisage can do something like that.

Anyway I was trying a simple example of using "easy_install -m", to see how it works.

I create a minimal library and install it with "-m", so in theory I thought that I can require
it and then use it and I do:
In [15]: pkg_resources.require('lib')
Out[15]: [lib 0.1 (/home/andrea/.local/lib/python2.7/site-packages/lib-0.1-py2.7.egg)]

But then
"import lib" or "from lib import module" both fail, so am I missing anything else?

As you said in the other email if I have a setup.py I would not even that, but how do I do in practice?

I tried to do an
"easy_install --user -i . foolproof"
and foolproof actually has "lib" in install_requires.

Now "lib" is already correctly installed with the "multiversion" option, but then if I try to run
the script in foolproof (the installed one) I still can't import "lib".

Anything else I should do?

Ok after som change (not sure what) I can actually import "lib" now from ipython or from a script. But importing it from the script which was built in the egg which actually has "lib" in install_requires
still doesn't work...

How can it be?
It doesn't add any pkg_resources trick to find the additional library, and in plus forcing the require doesn't work either..
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to