> On Aug. 4, 2015, 5:17 p.m., Marco Massenzio wrote: > > Can you please define how did you test that this works in the 'tests' > > section? > > I can try this out on Ubuntu 14.04 (and OSX) given the steps to reproduce > > the issue, and then applying the patch. > > > > Once we verify that it works on enough platforms, we can ship it. > > > > Thanks! > > haosdent huang wrote: > Hi, @marco. Thank you for your help. > > Marco Massenzio wrote: > haha thank *you* for fixing this! > I'm testing it out currently on my Mac - will try it out on a Ubuntu VM > or my home box later this evening. > Will keep you posted. > > Thanks for repro steps!
ok - this *almost* worked :) Are we missing an `__init__.py` in `google`? ``` $ ../configure --prefix=/Users/marco/mesos-inst/lib ``` then the usual `make && make install` - then: ``` $ find . |grep __init__ ./lib/python/site-packages/google/protobuf/__init__.py ./lib/python/site-packages/google/protobuf/__init__.pyc ./lib/python/site-packages/google/protobuf/compiler/__init__.py ./lib/python/site-packages/google/protobuf/compiler/__init__.pyc ./lib/python/site-packages/google/protobuf/internal/__init__.py ./lib/python/site-packages/google/protobuf/internal/__init__.pyc ./lib/python/site-packages/google/protobuf/pyext/__init__.py ./lib/python/site-packages/google/protobuf/pyext/__init__.pyc ./lib/python/site-packages/mesos/__init__.py ./lib/python/site-packages/mesos/__init__.pyc ./lib/python/site-packages/mesos/interface/__init__.py ./lib/python/site-packages/mesos/interface/__init__.pyc ./lib/python/site-packages/mesos/native/__init__.py ./lib/python/site-packages/mesos/native/__init__.pyc ./libexec/mesos/python/mesos/__init__.py ``` as you can see, there are now the `__init__.py` files in the right places under `mesos` (if you do the same from `master` there's nothing in there - so, yay! :) but there is none under the `google/` package: ``` [~/mesos-inst/lib] $ export PYTHONPATH=./lib/python/site-packages/ [~/mesos-inst/lib] $ python Python 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import mesos >>> from mesos import native Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/marco/mesos-inst/lib/lib/python/site-packages/mesos/native/__init__.py", line 17, in <module> from ._mesos import MesosExecutorDriverImpl File "/Users/marco/mesos-inst/lib/lib/python/site-packages/mesos/interface/mesos_pb2.py", line 4, in <module> from google.protobuf.internal import enum_type_wrapper ImportError: No module named google.protobuf.internal >>> import google.protobuf.internal Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named google.protobuf.internal ``` This was on a Mac OSX 10.10 (Yosemite) - about to test the same on an Ubuntu 14.04 VM, brand new. - Marco ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37081/#review94084 ----------------------------------------------------------- On Aug. 4, 2015, 5:33 p.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37081/ > ----------------------------------------------------------- > > (Updated Aug. 4, 2015, 5:33 p.m.) > > > Review request for mesos, Kapil Arya and Marco Massenzio. > > > Bugs: MESOS-2337 > https://issues.apache.org/jira/browse/MESOS-2337 > > > Repository: mesos > > > Description > ------- > > Let __init__.py getting installed to > $PREFIX/lib/pythonX.Y/site-packages/mesos. > > > Diffs > ----- > > src/Makefile.am 54eaf205eecb6bf1a9a5c4b5ddad55f46ad635ec > src/python/setup.py.in 304c4bf87870fbaff2de0615cfd2263bb8a7ad3a > > Diff: https://reviews.apache.org/r/37081/diff/ > > > Testing > ------- > > ## Test steps > ### In CentOS 6.6 > ``` > ./bootstrap > mkdir build > cd build > make -j4 > sudo make install > ``` > > And then execute > > ``` > export PYTHONPATH=/usr/local/lib/python2.6/site-packages > python -c "import mesos; from mesos import native; from mesos import > interface" > ``` > > Check it could success or not. > > Also check the `__init__.py` file > ``` > cat /usr/local/lib/python2.6/site-packages/mesos/__init__.py > ``` > > > Thanks, > > haosdent huang > >