> On Aug. 5, 2015, 9:57 a.m., Sebastien Pahl wrote:
> > src/python/interface/setup.py.in, line 27
> > <https://reviews.apache.org/r/37081/diff/6/?file=1032437#file1032437line27>
> >
> >     This seems weird to me. Why do you need to add the bindings for the 
> > google search engine?
> >     
> >     https://pypi.python.org/pypi/google

Yes, I think it is also a bit dirty here.

Because I try to fix this, could you see @marco comment above. I don't have 
other ideas to let it contains `__init__.py` under google, so I add this 
dependency.

```
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.
```


- haosdent


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37081/#review94215
-----------------------------------------------------------


On Aug. 5, 2015, 9:54 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37081/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2015, 9:54 a.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Kapil Arya, Marco Massenzio, and 
> Sebastien Pahl.
> 
> 
> 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/interface/setup.py.in afcaf7ad6851eb36304a3be92c062cb6b21dbb03 
>   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
> 
>

Reply via email to