This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chba
Recipients Arfrever, Trundle, barry, brett.cannon, chba, eric.smith, eric.snow, jcea, jkloth, lemburg, loewis, meador.inge, r.david.murray
Date 2014-03-27.07:31:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1395905499.45.0.966607963941.issue16047@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry guys, library loading of a freezed binary is different to interpreter mode. This is a bug in freeze, or at least an undocumented missing feature of freeze. This is no side discussion.

And, in Python 3.2 this was working! As described above, just creating a subdir psycopg2 in the working direktory of the frozen binary containing a link _psycopg.so to the library. This is a fact. I have two working production systems using this mechanism under Ubuntu 12.04 LTS.

Ok, psycopg2 seems to load the so file indirectly over __init__.py, however, the interpreter and older versions of freeze support that. The psycopg2 guys do not see any problem in that, see the closed entry linked above in their bug database.

A workaround/hack I am using successfully now is to replace any 'import psycopg2._psycopg' by 'import _psycopg' in all /usr/lib/python3/dist-packages/psycopg2/*.py files and to set PYTHONPATH=//usr/lib/python3/dist-packages/psycopg2 prior execution of the frozen binary. I found this only by playing around several days, there is NO documentation about that. The advices statically linking etc. given here are too superficial. Any more helful/concrete advices (outside of this thread) seem to cost money.

I wanted and still want help to fix this by giving detailed reports.
History
Date User Action Args
2014-03-27 07:31:39chbasetrecipients: + chba, lemburg, loewis, barry, brett.cannon, jcea, eric.smith, jkloth, Arfrever, r.david.murray, Trundle, meador.inge, eric.snow
2014-03-27 07:31:39chbasetmessageid: <1395905499.45.0.966607963941.issue16047@psf.upfronthosting.co.za>
2014-03-27 07:31:39chbalinkissue16047 messages
2014-03-27 07:31:38chbacreate