[ 
https://issues.apache.org/jira/browse/MESOS-2337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653804#comment-14653804
 ] 

haosdent commented on MESOS-2337:
---------------------------------

Hi, [~marco-mesos] "__init__.py not getting installed in 
$PREFIX/lib/pythonX.Y/site-packages/mesos" is correct, because we use multi 
submodule way to package python. I think this ticket is not a problem.

Under src/python directory, we have native/protocol/interface modules. They 
share a same parent mesos. If we contains __init__.py under mesos, it would 
conflict when install. Because every python submodule have a __init__.py under 
mesos. So python setup tool would skip this when package them.
{quote}
Skipping installation of build/bdist.linux-x86_64/wheel/mesos/__init__.py 
(namespace package)
{quote}

And python would use something like mesos.interface-0.23.0-py2.6-nspkg.pth to 
make sure mesos could be import correctly, although we don't have __init__.py 
under $PREFIX/lib/pythonX.Y/site-packages/mesos.

But pth seems only could load from default sys.path or add it to 
site.addsitedir. If you want to load it through set $PYTHONPATH, it could not 
work.

> __init__.py not getting installed in $PREFIX/lib/pythonX.Y/site-packages/mesos
> ------------------------------------------------------------------------------
>
>                 Key: MESOS-2337
>                 URL: https://issues.apache.org/jira/browse/MESOS-2337
>             Project: Mesos
>          Issue Type: Bug
>          Components: build, python api
>            Reporter: Kapil Arya
>            Assignee: Marco Massenzio
>            Priority: Critical
>              Labels: mesosphere
>
> When doing a {{make install}}, the src/python/native/src/mesos/__init__.py 
> file is not getting installed in 
> {{$PREFIX/lib/pythonX.Y/site-packages/mesos/}}.  
> This makes it impossible to do the following import when {{PYTHONPATH}} is 
> set to the {{site-packages}} directory.
> {code}
> import mesos.interface.mesos_pb2
> {code}
> The directories {{$PREFIX/lib/pythonX.Y/site-packages/mesos/interface, 
> native}} do have their corresponding {{__init__.py}} files.
> Reproducing the bug:
> {code}
> ../configure --prefix=$HOME/test-install && make install
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to