Marc-Andre Lemburg added the comment:

On 25.03.2014 13:02, Christian Bachmaier wrote:
> 
> Christian Bachmaier added the comment:
> 
> # ldd hello
>         linux-vdso.so.1 =>  (0x00007fffd677e000)
>         libpython3.4m.so.1.0 => 
> /usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0 (0x00007f968c6c2000)
>         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
> (0x00007f968c4a4000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f968c0dd000)
>         libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 
> (0x00007f968beb3000)
>         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f968bc9a000)
>         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f968ba95000)
>         libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 
> (0x00007f968b892000)
>         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f968b58c000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f968ccfb000)
> 
> and (even strace) does not show an attempt to acces the so-file. Also tried 
> to add
> 
> -L/usr/lib/python3/dist-packages/psycopg2 
> -l_psycopg.cpython-34m-x86_64-linux-gnu.so
> 
> and similar without success.
> 
> Can anyone try to reproduce it, a freeze (with patches) of hello.py 
> containing only
> 
> import _psycopg2
> 
> or maybe another external library? In the first case apt-get install 
> python3-psycopg2 is necessary.

Christian, what you're expecting is not what freeze can offer.

The shared library is not linked into the resulting binary
by simply having an import in the Python file. freeze does
support adding the external library statically, but it's not
easy.

See the eGenix PyRun source archive for how it's done:

    http://www.egenix.com/products/python/PyRun/

The question I raised was whether running "hello" will
fail to import the shared library _pyscopg2*.so or not.

If that's the case (and only then), you have found a bug that
needs fixing. If not, please ask your usage questions on other
lists. This ticket is about getting freeze working again for
Python 3.x, not about its usage.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16047>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to