I like to figure out the myth behind Python's namespace packages by setuptools, and here is what I did test.
- Make a virtual environment by
virtualenv
. - Find a namespaced package on PyPI.
- Install that package by
pip install
. - Check the installed file hierarchy.
The package I played with is zope.interface and it worked well with the following file hierarchy on my virtualenv:
~virenv/.../site-packages/zope.interface-3.8.0-py2.6-nspkg.pth
/zope.interface-3.8.0-py2.6.egg-info/
/zope/
/interface/
/...
Everything looked fine and I love the way zope.interface got installed as a real namespaced package (under folder zope).
Then, I did another test and that's the question I would like to ask for your help. I downloaded the tared zope.interface source file. I liked to play it manually again
- Make a virtual environment by
virtualenv
. - Untar the zope.interface into somewhere.
- Install the package by
python setup.py install
. - Go check what happened in site-packages.
The site-packages looks like this:
~virenv/../site-packages/zope.interface-...egg/
/zope/
/__init__.py
/interface/
/EGG-INFO/
Q. How come I can't get the exactly result to pip install
by manually python setup.py install
?
No comments:
Post a Comment