---------- Forwarded message ----------
From: Rick Morrison <[EMAIL PROTECTED]>
Date: May 8, 2006 2:08 PM
Subject: Re: Re[2]: [Sqlalchemy-users] SQLAlchemy and py2exe Instructions
To: Gambit <[EMAIL PROTECTED]>
Hey Gambit,
I'm using cx_Freeze, which I guess doesn't do as good of a job at chasing down package trees. If py2exe can handle entire packages, which it appears to do based on your command line, it might find the databases/__init__.py and package in all of the database modules.
cx_Freeze doesn't appear to do that, and so I end up specifying each of the needed database modules like this:
freezepython include-modules="sqlalchemy.databases.sqlite" main.py
Anyone know if there's something in cx_freeze that operates similarly to the "--packages" option in py2exe?
I'm using cx_Freeze, which I guess doesn't do as good of a job at chasing down package trees. If py2exe can handle entire packages, which it appears to do based on your command line, it might find the databases/__init__.py and package in all of the database modules.
cx_Freeze doesn't appear to do that, and so I end up specifying each of the needed database modules like this:
freezepython include-modules="sqlalchemy.databases.sqlite" main.py
Anyone know if there's something in cx_freeze that operates similarly to the "--packages" option in py2exe?
Rick
On 5/8/06, Gambit <[EMAIL PROTECTED]> wrote:
Hey Rick,
The approach I used seems to have picked up the sqlalchemy/databases/*.pyc
files, it's the default dependency checking that doesn't pick those up.
Having the symlink in the source directory also prevents duplicate files from
being acquired.
What was the commandline that you used, if you still have that around?
-G
On Monday, May 8, 2006, 3:43:37 AM, you wrote:
> Also be aware that the database imports (that is both database-specific
> support within SA such as "mysql.py", "mssql.py" etc., as well as the DBAPI
> files used beneath the covers) are loaded dynamically by SA, and therefore
> won't be detected by the dependency checkers in py2exe and cxFreeze.
> You'll need to include those modules on the command line. (At least I had
> to...). Note that testing on your own machine won't reveal this, as those
> modules will be installed. This won't bite until you try to deploy.
> Rick
> On 5/7/06, Gambit <[EMAIL PROTECTED]> wrote:
>>
>> Hey All,
>>
>> Spent a little time today trying to package up my application for it's
>> first
>> round of test users and such. Put it together with the py2exe (and,
>> eventually, will probably use 'freeze' for the linux side) and immediately
>> ran
>> into the problem of py2exe not understanding .egg's. Sigh.
>>
>> The quick fix I put together was to, first of all, make sure the egg's
>> were
>> not ziped, and then create symlinks in my root project directory to the
>> proper
>> directory:
>> ln -s .../SQLAlchemy-1.7...egg/sqlalchemy sqlalchemy
>> ln -s .../psycopg2 psycopg2
>>
>> I used the following setup.py for my wxWindows application:
>> from distutils.core import setup
>> import py2exe
>>
>> setup(name='geartrac',
>> version='1.0',
>> py_modules=['GearTrac'],
>> windows=['GearTrac.py']
>> )
>> and kicked the whole thing off with:
>>
>> python setup.py py2exe --dist-dir=dist/exe --bundle=1
>> --packages=sqlalchemy,psycopg2
>>
>> So far it looks like the end result is working :) Hope this helps the
>> next
>> person in line :P
>>
>> Cheers!
>> -G
>>
>>
>>
>> -------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Sqlalchemy-users mailing list
>> Sqlalchemy-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users