I'm sorry to revive this thread after several time but i've got busy
months ago.
py2exe simply "packs" all the python resources inside a zip file
called "library.zip" that you have to redistribute with your exe.
Inside this zip there are the pyc of sqlalchemy and obviously
sqlalchemy-migrate.
Right now i've added in the zip the repository with the migration
scripts used to migrate my application. When i start the application
and "upgrade" gets executed
i got the following error:
File "migrate\versioning\util\__init__.pyc", line 160, in with_engine
File "migrate\versioning\api.pyc", line 248, in version_control
File "migrate\versioning\schema.pyc", line 128, in create
File "migrate\versioning\repository.pyc", line 76, in __init__
File "migrate\versioning\repository.pyc", line 97, in verify
migrate.versioning.exceptions.InvalidRepositoryError: db_repository
obviously it doesn't search inside the "library.zip" for the
repository.
The code that gets the error is the following (in repository.py):
def verify(cls, path):
"""
Ensure the target path is a valid repository.
:raises: :exc:`InvalidRepositoryError
<migrate.versioning.exceptions.InvalidRepositoryError>`
"""
# Ensure the existence of required files
try:
cls.require_found(path)
cls.require_found(os.path.join(path, cls._config))
cls.require_found(os.path.join(path, cls._versions))
except exceptions.PathNotFoundError, e:
raise exceptions.InvalidRepositoryError(path)
and i don't know how to change this for searching the repository
inside the zip generated by library.zip.
Thanks for any help.
---------- Forwarded message ----------
From: Domen Kožar <ielect...@gmail.com>
Date: 6 Ago 2010, 14:44
Subject: sqlalchemy-migrate and py2exe
To: migrate-users
Hey,
setuptools provides tools like resource_filename which finds filename
you are looking for in your package (which might be an egg - basically
zip). I have no idea howpy2exeworks, but here is some information
about the issue:
http://old.nabble.com/resource_filename()-breaks-cxfreeze-(py2exe-)-t...
If you provide a patch with tests I'm willing to improve codebase on
that level.
Domen
On Jul 17, 1:12 pm, Emanuele Gesuato <emanuele.gesu...@gmail.com>
wrote:
> Hi there,
> I'm using python 2.5, sqlachemy 0.5 and sqlalchemy-migrate 0.6.
> I'm trying to add the migration facility to desktop program that i
> want to deliver as exe so i'm usingpy2exeand i'm having trouble