Re: Proton Python install shenanigans

2014-12-01 Thread Gordon Sim

On 11/30/2014 04:31 PM, Fraser Adams wrote:

Now I'm thinking that make install hasn't pulled all of the necessary
files into /usr/local/lib/proton/bindings/python the reason I'm thinking
that is when I tried running
source config.sh

I noticed that the PYTHONPATH it created looked like

PYTHONPATH=/home/fadams/qpid/git/qpid-proton/tests/python:/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python:/home/fadams/qpid/git/qpid-proton/build/proton-c/bindings/python


and this *does* appear to work, the significant bit seems to be the
/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python bit, because
when I tried:

PYTHONPATH=/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python:/usr/local/lib/proton/bindings/python


that worked too.

So I'm thinking that the directory proton and its contents in
qpid-proton/proton-c/bindings/python need to be copied to

/usr/local/lib/proton/bindings/python

as part of the make install process too.


Does that seem about right?


The install loses any necessary structure, specifically now the 'proton' 
sub directory for the new package. I hit the same thing and committed a 
fix to the examples branch: 
https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=805cd17e360fd77eab29d60955a2193c7e7f0635





Re: Proton Python install shenanigans

2014-12-01 Thread Darryl L. Pierce
On Sun, Nov 30, 2014 at 04:31:20PM +, Fraser Adams wrote:
 I've been tearing my hair out a bit trying to figure why I can't see the
 relevant Python modules.
 
 I build Proton on a clean Linux Mint 17 system (which is based on Ubuntu
 14.04)
 
 make all builds successfully and sudo make install installs the following:
 
 fadams@zappa /usr/local/lib/proton/bindings/python $ ls -al
 total 2120
 drwxr-xr-x 2 root root4096 Nov 30 12:28 .
 drwxr-xr-x 5 root root4096 Nov 30 12:20 ..
 -rw-r--r-- 1 root root   89278 Nov 30 11:29 cproton.py
 -rw-r--r-- 1 root root  103293 Nov 30 12:28 cproton.pyc
 -rw-r--r-- 1 root root  103293 Nov 30 12:28 cproton.pyo
 -rw-r--r-- 1 root root 1445471 Nov 30 12:20 _cproton.so
 -rw-r--r-- 1 root root  109162 Nov 30 11:20 __init__.py
 -rw-r--r-- 1 root root  151464 Nov 30 12:28 __init__.pyc
 -rw-r--r-- 1 root root  151257 Nov 30 12:28 __init__.pyo
 
 
 I set PYTHONPATH=/usr/local/lib/proton/bindings/python
 
 but when I try
 ./msgr-recv.py
 
 I get
 
 Traceback (most recent call last):
   File ./msgr-recv.py, line 23, in module
 from proton import *
 ImportError: No module named proton
 
 
 Now I'm thinking that make install hasn't pulled all of the necessary files
 into /usr/local/lib/proton/bindings/python the reason I'm thinking that is
 when I tried running
 source config.sh
 
 I noticed that the PYTHONPATH it created looked like
 
 PYTHONPATH=/home/fadams/qpid/git/qpid-proton/tests/python:/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python:/home/fadams/qpid/git/qpid-proton/build/proton-c/bindings/python
 
 and this *does* appear to work, the significant bit seems to be the
 /home/fadams/qpid/git/qpid-proton/proton-c/bindings/python bit, because when
 I tried:
 
 PYTHONPATH=/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python:/usr/local/lib/proton/bindings/python
 
 that worked too.
 
 So I'm thinking that the directory proton and its contents in
 qpid-proton/proton-c/bindings/python need to be copied to
 
 /usr/local/lib/proton/bindings/python
 
 as part of the make install process too.
 
 Does that seem about right?

The code was migrated to a directory, so should be installing to:

  /path/to/python/site-libs/proton

?

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/



pgpGzPDd5AjFD.pgp
Description: PGP signature


Proton Python install shenanigans

2014-11-30 Thread Fraser Adams

 Hey all,
I've been tearing my hair out a bit trying to figure why I can't see the 
relevant Python modules.


I build Proton on a clean Linux Mint 17 system (which is based on Ubuntu 
14.04)


make all builds successfully and sudo make install installs the following:

fadams@zappa /usr/local/lib/proton/bindings/python $ ls -al
total 2120
drwxr-xr-x 2 root root4096 Nov 30 12:28 .
drwxr-xr-x 5 root root4096 Nov 30 12:20 ..
-rw-r--r-- 1 root root   89278 Nov 30 11:29 cproton.py
-rw-r--r-- 1 root root  103293 Nov 30 12:28 cproton.pyc
-rw-r--r-- 1 root root  103293 Nov 30 12:28 cproton.pyo
-rw-r--r-- 1 root root 1445471 Nov 30 12:20 _cproton.so
-rw-r--r-- 1 root root  109162 Nov 30 11:20 __init__.py
-rw-r--r-- 1 root root  151464 Nov 30 12:28 __init__.pyc
-rw-r--r-- 1 root root  151257 Nov 30 12:28 __init__.pyo


I set PYTHONPATH=/usr/local/lib/proton/bindings/python

but when I try
./msgr-recv.py

I get

Traceback (most recent call last):
  File ./msgr-recv.py, line 23, in module
from proton import *
ImportError: No module named proton


Now I'm thinking that make install hasn't pulled all of the necessary 
files into /usr/local/lib/proton/bindings/python the reason I'm thinking 
that is when I tried running

source config.sh

I noticed that the PYTHONPATH it created looked like

PYTHONPATH=/home/fadams/qpid/git/qpid-proton/tests/python:/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python:/home/fadams/qpid/git/qpid-proton/build/proton-c/bindings/python

and this *does* appear to work, the significant bit seems to be the 
/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python bit, because 
when I tried:


PYTHONPATH=/home/fadams/qpid/git/qpid-proton/proton-c/bindings/python:/usr/local/lib/proton/bindings/python

that worked too.

So I'm thinking that the directory proton and its contents in 
qpid-proton/proton-c/bindings/python need to be copied to


/usr/local/lib/proton/bindings/python

as part of the make install process too.


Does that seem about right?

Cheers,
Frase