> -----Original Message-----
> From: Ken Giusti [mailto:kgiu...@redhat.com]
> Sent: Freitag, 15. September 2017 15:15
> To: users <users@qpid.apache.org>
> Subject: Re: Proton bindings for python3
> 
> Hi Philipp,
> 
> There's a couple of ways to install the binding via pip:
> 
> 1) from the source release:
> 
> Look for the PACKAGING.txt file in proton-c/bindings/python in the source
> tree.  That will explain how to install the binding via setup.py.  You have 
> the
> option of building the sdist tar and install that via pip:
> 
> $ cd <build-dir>/proton-c/bindings/python/dist
> $ python setup.py build sdist
> $ pip install dist/python-qpid-proton-0.17.0.tar.gz
> 
> OR
> 
> 2) use pip to download and install python-qpid-proton via pypi
> 
> pip install python-qpid-proton
> 
> Whatever works for you.  However note well for both approaches:
> 
> 1) you need to have the 1.0.x SSL dev packages installed (libssl-dev).
> Without this the binding will end up disabling SSL support.
> 2) Double check that the binding actually links to the correct library.  When
> installing the setup.py script checks to see if there is already the correct
> version of libqpid-proton installed (it checks via pkg-config) and uses that
> library when linking.  If setup.py doesn't find a suitable libqpid-proton it 
> will
> attempt to build it using the provided C files.  The point being if setup.py
> finds a library that does not have SSL enabled the resulting python module
> will lack SSL support.


Ok, ultimately, the problem was that pkg-config was not present on the system.
This meant that the pip install could neither find libqpid nor libssl.
There are actually nice warnings "pkg-config not found" printed when installing 
via "python setup.py". However, when installing via pip they are suppressed 
(maybe logged?) and it silently builds proton from scratch without SSL.
Thanks for the detailed breakdown.


> 
> let us know if you hit any problems
> 
> -K
> 
> On Fri, Sep 15, 2017 at 3:50 AM, Philipp Eib <philipp....@greenteg.com>
> wrote:
> >> -----Original Message-----
> >> From: Ken Giusti [mailto:kgiu...@redhat.com]
> >> Sent: Donnerstag, 14. September 2017 18:29
> >> To: users <users@qpid.apache.org>
> >> Subject: Re: Proton bindings for python3
> >>
> >> On Thu, Sep 14, 2017 at 11:04 AM, Philipp Eib
> >> <philipp....@greenteg.com>
> >> wrote:
> >> > Hi Ken.
> >> >
> >> > Thanks for your answer.
> >> > I installed it from standard 16.04 repo.
> >> > I have now added the Qpid PPA, but it seems to only contain a
> >> > "python-
> >> qpid-proton" package, but no "python3-qpid-proton":
> >> >
> >> > $ apt-cache showpkg python-qpid-proton
> >> > Package: python-qpid-proton
> >> > Versions:
> >> >  0.17.0-1xenial+qpid1
> >> > (/var/lib/apt/lists/ppa.launchpad.net_qpid_released_ubuntu_dists_xe
> >> > nia
> >> > l_main_binary-amd64_Packages)
> >> > [...]
> >> > 0.10-2
> >> > (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial_universe
> >> > _bi
> >> > nary-amd64_Packages)
> >> >
> >> > $ apt-cache showpkg python3-qpid-proton
> >> > Package: python3-qpid-proton
> >> > Versions:
> >> > 0.10-2
> >> > (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial_universe
> >> > _bi
> >> > nary-amd64_Packages) (/var/lib/dpkg/status)
> >> >
> >> > The Python3  v0.10-2 package is from the official repo and, at
> >> > least for me,
> >> does not contain SSL:
> >> > $ python3
> >> > Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
> >> > on linux Type "help", "copyright", "credits" or "license" for more
> >> > information.
> >> >>>> import proton
> >> >>>> proton.SSL.present()
> >> > False
> >> >>>>
> >> >
> >> > Can you please check from which repo you got the
> >> > python3-qpid-proton
> >> package with SSL?
> >> >
> >>
> >>
> >> Aha!  My mistake: looks like mine is pulled from universe also!  I'm
> >> so used to using the ppa I didn't notice.
> >> I can't explain why your installation does not have SSL support -
> >> apt-cache shows a dependency on it for me:
> >>
> >>
> >> $ apt-cache showpkg python3-qpid-proton
> >> Package: python3-qpid-proton
> >> Versions:
> >> 0.10-2
> >> (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_univers
> >> e_bi
> >> nary-amd64_Packages)
> >> (/var/lib/dpkg/status)
> >>  Description Language:
> >>                  File:
> >> /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_universe
> >> _bin
> >> ary-amd64_Packages
> >>                   MD5: e9b42c24004b85935e6d4fcc7c3049d1  Description 
> >> Language:
> >>                  File:
> >> /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_universe
> >> _bin
> >> ary-i386_Packages
> >>                   MD5: e9b42c24004b85935e6d4fcc7c3049d1  Description 
> >> Language:
> >> en
> >>                  File:
> >> /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_universe
> >> _i18
> >> n_Translation-en
> >>                   MD5: e9b42c24004b85935e6d4fcc7c3049d1
> >>
> >>
> >> Reverse Depends:
> >>   python3-pyngus,python3-qpid-proton 0.9
> >>   python3-qpid-proton:i386,python3-qpid-proton
> >> Dependencies:
> >> 0.10-2 - libqpid-proton2 (0 (null)) python3 (3 3.6) python3 (2 3.5~)
> >> libc6 (2 2.14) libssl1.0.0 (2 1.0.0) python3-qpid-proton:i386 (32
> >> (null))
> >> Provides:
> >> 0.10-2 - python3.5-qpid-proton (= )
> >> Reverse Provides:
> >>
> >> kgiusti@Ubuntu16:~$ dpkg-query -L python3-qpid-proton /.
> >> /usr
> >> /usr/lib
> >> /usr/lib/python3
> >> /usr/lib/python3/dist-packages
> >> /usr/lib/python3/dist-packages/_cproton.cpython-35m-x86_64-linux-gnu.
> >> so /usr/lib/python3/dist-packages/python_qpid_proton-0.10.0.egg-info
> >> /usr/lib/python3/dist-packages/proton
> >> /usr/lib/python3/dist-packages/proton/_compat.py
> >> /usr/lib/python3/dist-packages/proton/reactor.py
> >> /usr/lib/python3/dist-packages/proton/__init__.py
> >> /usr/lib/python3/dist-packages/proton/wrapper.py
> >> /usr/lib/python3/dist-packages/proton/utils.py
> >> /usr/lib/python3/dist-packages/proton/handlers.py
> >> /usr/lib/python3/dist-packages/cproton.py
> >> /usr/share
> >> /usr/share/doc
> >> /usr/share/doc/python3-qpid-proton
> >> /usr/share/doc/python3-qpid-proton/copyright
> >> /usr/share/doc/python3-qpid-proton/changelog.Debian.gz
> >>
> >> kgiusti@Ubuntu16:~$ ldd
> >> /usr/lib/python3/dist-packages/_cproton.cpython-35m-x86_64-linux-
> gnu.so
> >>     linux-vdso.so.1 =>  (0x00007ffd84c58000)
> >>     libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0
> >> (0x00007f778151a000)
> >>     libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
> >> (0x00007f77810d6000)
> >>     librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7780ece000)
> >>     libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> >> (0x00007f7780cb1000)
> >>     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f77808e7000)
> >>     libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f77806e3000)
> >>     /lib64/ld-linux-x86-64.so.2 (0x00007f7781a42000)
> >
> >
> > Thanks for the detailed report, it helped me track down the problem.
> > I found a rogue pip install I must have done some time ago...
> > After uninstalling it python used the system one and SSL was available.
> >
> > Is it possible to provide the pip binary with SSL as well?
> > I tend to prefer pip over system package managers as the former are
> usually more frequently updated and integrate well with virtualenv.
> >
> > p.
> >
> >
> >> > Thanks,
> >> > p.
> >> >
> >> > -----Original Message-----
> >> > From: Ken Giusti [mailto:kgiu...@redhat.com]
> >> > Sent: Donnerstag, 14. September 2017 16:10
> >> > To: users <users@qpid.apache.org>
> >> > Subject: Re: Proton bindings for python3
> >> >
> >> > Hi Philipp,
> >> >
> >> >
> >> >
> >> > On Thu, Sep 14, 2017 at 9:16 AM, Philipp Eib
> >> > <philipp....@greenteg.com>
> >> wrote:
> >> >> Hi,
> >> >>
> >> >> what do I need to set to build the proton bindings for python3
> >> >> instead of the default python2?
> >> >>
> >> >>
> >> >>
> >> >> Background:
> >> >>
> >> >> I need Proton with SSL support. Unfortunately, the
> >> >> python3-qpid-proton package for Ubuntu is not built with SSL
> >> >> support => I get an error
> >> >> "SSLUnavailable: amqps: SSL libraries not found".
> >> >>
> >> >
> >> > Hrm... what version of the python3-qpid-proton package did you
> >> > install?   Did you install it from the Qpid released PPA?
> >> >
> >> > I'm on 16.04, have added the Qpid PPA (sudo add-apt-repository
> >> > ppa:qpid/released) and installed python3-qpid-proton version 0.10-2
> >> > via
> >> apt-get.
> >> > Looks like it's dependent on libssl.  And importing the proton
> >> > module in
> >> python3 shows that SSL support is present:
> >> >
> >> > kgiusti@Ubuntu16:~$ python3
> >> > Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
> >> > on linux
> >> Type "help", "copyright", "credits" or "license" for more information.
> >> >>>> import proton
> >> >>>> proton.SSL.present()
> >> > True
> >> >>>>
> >> >
> >> >
> >> >
> >> >> Therefore I have built proton myself. Only problem: the python2
> >> >> interpreter is used by default.
> >> >>
> >> >> Stupidly using the generated python2 .so in python3 results in an
> >> >> "ImportError: dynamic module does not define module export
> >> >> function (PyInit__cproton)".
> >> >>
> >> >>
> >> >>
> >> >> Thanks,
> >> >>
> >> >> p.
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > -K
> >> >
> >> > -------------------------------------------------------------------
> >> > -- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For
> >> > additional commands, e-mail: users-h...@qpid.apache.org
> >> >
> >> >
> >> >
> >> > -------------------------------------------------------------------
> >> > -- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For
> >> > additional commands, e-mail: users-h...@qpid.apache.org
> >> >
> >>
> >>
> >>
> >> --
> >> -K
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For
> >> additional commands, e-mail: users-h...@qpid.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For
> > additional commands, e-mail: users-h...@qpid.apache.org
> >
> 
> 
> 
> --
> -K
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional
> commands, e-mail: users-h...@qpid.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to