oslo.config doesn't install oslo package's __init__.py
Bug #1129587 reported by
Jason Kölker
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
Critical
|
Jason Kölker | ||
Grizzly |
Fix Released
|
Critical
|
Jason Kölker |
Bug Description
When oslo.config is installed via easy_install or python setup.py install the package is installed under the egg folder and the egg path appended to the easy-install.pth. Since oslo is not declared as a package the __init__.py from the oslo dir is not copied over causing the install to be broken. Pip doesn't suffer from this if this is the 1st package being installed from the oslo namespace as it copies the tree over (I havn't looked at the internals of pip just the outcome ;).
Changed in oslo: | |
assignee: | nobody → Jason Kölker (jason-koelker) |
Changed in oslo: | |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in oslo: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Pip is happy without the oslo/__init__.py due to this magic:
<oslo.config> jkoelker@null 0p2 ~/.virtualenvs/ oslo.config/ lib/python2. 7/site- packages$ cat oslo_config- 2013.1. a2.g394876f- py2.7-nspkg. pth join(sys. _getframe( 1).f_locals[ 'sitedir' ], *('oslo',)); ie = os.path. exists( os.path. join(p, '__init_ _.py')) ; m = not ie and s setdefault( 'oslo', types.ModuleTyp e('oslo' )); mp = (m or []) and m.__dict_ _.setdefault( '__path_ _',[]); (p not in mp) and mp.append(p)
import sys,types,os; p = os.path.
ys.modules.