qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Foglia (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (QPID-3333) Make Python SWIG bindings a drop-in replacement for pure Python qpid.messaging package
Date Tue, 05 Jul 2011 17:57:16 GMT

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

Anthony Foglia edited comment on QPID-3333 at 7/5/11 5:56 PM:
--------------------------------------------------------------

How did you have to modify your spout and drain, other than any changes in module names?

One problem with making this a fully drop-in replacements is that the python api is a subpackage
of the qpid package.  So users typically import qpid.messaging and use the full package name
(e.g. connection = qpid.messaging.Connection.).  One can't do the usual trick of trying to
open the compiled version easily, e.g.

{code}
try :
  import cPickle as pickle
except ImportError :
  import pickle
{code}

Instead in our code we've been doing,

{code}
try :
  import cqpid as messaging
except ImportError :
  import qpid.messaging as messaging
{code}

I don't like using the generic name "messaging", but it was the easiest.

Another problem, which I need to dive into more, is that the make files install the compiled
_cqpid.so in ${PREFIX}/lib, not ${PREFIX}/lib/pythonX.Y/site-packages or ${PREFIX}/lib64/pythonX.Y/site-packages.
 I don't know any of the details of autotools or cmake, but I want to dig in a little before
making a new bug report on it.

      was (Author: afoglia):
    How did you have to modify your spout and drain, other than any changes in module names?

One problem with making this a fully drop-in replacements is that the python api is a subpackage
of the qpid package.  So users typically import qpid.messaging and use the full package name
(e.g. connection = qpid.messaging.Connection.).  One can't do the usual trick of trying to
open the compiled version easily, e.g.

try :
  import cPickle as pickle
except ImportError :
  import pickle

Instead in our code we've been doing,

try :
  import cqpid as messaging
except ImportError :
  import qpid.messaging as messaging

I don't like using the generic name "messaging", but it was the easiest.

Another problem, which I need to dive into more, is that the make files install the compiled
_cqpid.so in ${PREFIX}/lib, not ${PREFIX}/lib/pythonX.Y/site-packages or ${PREFIX}/lib64/pythonX.Y/site-packages.
 I don't know any of the details of autotools or cmake, but I want to dig in a little before
making a new bug report on it.
  
> Make Python SWIG bindings a drop-in replacement for pure Python qpid.messaging package
> --------------------------------------------------------------------------------------
>
>                 Key: QPID-3333
>                 URL: https://issues.apache.org/jira/browse/QPID-3333
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Client
>    Affects Versions: 0.11, Future
>            Reporter: Anthony Foglia
>         Attachments: 0001-Wrap-NoMessageAvailable-as-Empty-exception.patch, 0002-Change-Connection-interface-to-match-pure-python.patch,
0003-Change-Session-interface-to-match-pure-python.patch, 0004-Change-Receiver-interface-to-match-pure-python.patch,
0005-Change-Sender-interface-to-match-pure-python.patch, 0006-Change-Message-interface-to-match-pure-python.patch
>
>
> These patches are make the compile Python SWIG bindings to the C++ client much closer
to a drop-in replacement for the Python qpid.messaging package.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message