Christian Bachmaier added the comment:

The shared library is not linked into the resulting binary
by simply having an import in the Python file.

Yes. This is why (at least in Python 3.2) it must be in the right path 
(subdirectory), see above.

> freeze does
> support adding the external library statically, but it's not
> easy.

Unfortunately, Debian/Ubuntu does not deliver a static version of psycopg2. So 
I'd like to use the dynamic version. This is definitively possible with Python 
3.2 x86, again, see above.

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

That's a good question. I think so, but how can I test that? At least the 
(only) way in Python 3.2 does not work any more. Even with Python 3.2 there 
must be a link in the subdirectory as shown above. It is not enough to have it 
only in the usual installation directory 
/usr/lib/python3/dist-packages/psycopg2/_psycopg.xxx.so
Even any set LD_LIBRARY_PATH is ignored, like also putting it in /usr/lib as 
far as I can see.

> This ticket is about getting freeze working again for
> Python 3.x

Right. So we should test the library feature which worked somehow magically in 
Python 3.2. Then we will see if it is a bug. My statement is that it is a bug.

Thanks again to all.

----------

_______________________________________
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