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









[jira] [Created] (PROTON-761) 100% CPU with multiple subscriptions

2014-11-30 Thread Fabien CHEVALIER (JIRA)
Fabien CHEVALIER created PROTON-761:
---

 Summary: 100% CPU with multiple subscriptions
 Key: PROTON-761
 URL: https://issues.apache.org/jira/browse/PROTON-761
 Project: Qpid Proton
  Issue Type: Bug
  Components: proton-c
Affects Versions: 0.8
Reporter: Fabien CHEVALIER


Calling pn_messenger_subscribe() twice (which seems to be perfectly valid) can 
result in proton hanging at 100% cpu, when one of the two sources is 
unreachable.

To reproduce, start the attached test case against a pristine ActiveMQ copy 
(./bin/activemq console). Proton will go nuts when trying to connect to the 
unavailable amqp://localhost:15672/ganymede instance.





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


[jira] [Updated] (PROTON-761) 100% CPU with multiple subscriptions

2014-11-30 Thread Fabien CHEVALIER (JIRA)

 [ 
https://issues.apache.org/jira/browse/PROTON-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fabien CHEVALIER updated PROTON-761:

Attachment: infinite-loop.c

 100% CPU with multiple subscriptions
 

 Key: PROTON-761
 URL: https://issues.apache.org/jira/browse/PROTON-761
 Project: Qpid Proton
  Issue Type: Bug
  Components: proton-c
Affects Versions: 0.8
Reporter: Fabien CHEVALIER
 Attachments: infinite-loop.c


 Calling pn_messenger_subscribe() twice (which seems to be perfectly valid) 
 can result in proton hanging at 100% cpu, when one of the two sources is 
 unreachable.
 To reproduce, start the attached test case against a pristine ActiveMQ copy 
 (./bin/activemq console). Proton will go nuts when trying to connect to the 
 unavailable amqp://localhost:15672/ganymede instance.



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