Phillip J. Eby wrote:
slate wrote:

Kids egg is not working. I solved this problem by downloading kids
source. I made an egg with setup.py, and installed this on my computer.


FYI, the issue is that kid's setup.py actually imports kid at the
beginning, and kid's initialization code imports ElementTree.  This is
broken, since until the setup actually runs to completion, there may
not even *be* an ElementTree package installed.  And if you *do* have
ElementTree installed, it may need to extract a resource from that egg,
which then causes the SandboxViolation.

Incidentally, to resolve a related issue in another project I did something like:

sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'paste', 'util'))
  import finddata

... instead of what I'd normally do, which would be "from paste.util import finddata". This avoids importing any other parts of the package (e.g., __init__.py), relying on the path in any way, or accidentally picking up a previously installed file. Of course, the finddata module shouldn't import anything itself (outside of the standard library); but since it's intended to be used this way it doesn't do that.

Anyway, this keeps my project root cleaner without the setuptools problems.


--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org

Reply via email to