Message214849
On 25.03.2014 19:41, M.-A. Lemburg wrote:
> I'll have to have a look at how the pyscopg2 package normally
> imports its C extension. It's likely that they will have to use
> something like this to make things work for frozen apps as well:
>
> try:
> from psycopg2 import _psycopg
> except ImportError:
> # try to find the module at the top-level
> import _psyocpg
>
> or setup the package's .__path__ to include the top-level
> dir.
The package uses absolute imports for importing the C extension, e.g.
from psycopg2._psycopg import __version__
This cannot work in Python with frozen packages. Not in Python 2 and
not in Python 3 either.
Christian: Your only option is not to freeze the psycopg2 package
and ship it along side your frozen application or to build the
frozen app with the psycopg2 C extension built statically.
In any case, freeze is not at fault here. |
|
Date |
User |
Action |
Args |
2014-03-25 20:07:45 | lemburg | set | recipients:
+ lemburg, loewis, barry, brett.cannon, jcea, eric.smith, jkloth, Arfrever, r.david.murray, Trundle, meador.inge, eric.snow, chba |
2014-03-25 20:07:45 | lemburg | link | issue16047 messages |
2014-03-25 20:07:45 | lemburg | create | |
|