Updating your code when using new 2.0.6 version of bob

14 views
Skip to first unread message

Pavel Korshunov

unread,
Dec 1, 2015, 9:52:48 AM12/1/15
to bob-devel
Hi,

We updated most of the bob packages by changing the mechanism which they use to find each other. This change is in bob since version 2.0.6. 

The practical meaning of this update is that you will have to change all the other packages you use that are not part of main bob package collection. 

So, if you install bob 2.0.6 and later and want to bootstrap your packages you used with previous versions of bob, you need to remove namespace declarations in all setup.py files of you package and its src directory. Also, you will need to change __init__.py files that have this line:
__import__('pkg_resources').declare_namespace(__name__)
to these two lines:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)

To make this transition process smoother, you can simply run the attached script and it will do all the necessary changes for you. It should run correctly on both linux and mac os x systems.

To summarize, here are the actions you will need to take:
1. cd into your package you want to bootstrap using new bob release 2.0.6.
2. run ./convert2newbob.sh script.
3. boostrap as follows:
python bootstrap-buildout.py
convert2newbob.sh
Reply all
Reply to author
Forward
0 new messages