Skip to content

Commit

Permalink
hooks: Add "sqlalchemy.ext.baked" to sqlalchemy hook.
Browse files Browse the repository at this point in the history
For issue #5106, added "sqlalchemy.ext.baked" to the hidden imports
list of sqlalchemy hook file hook-sqlalchemy.py. This is because it was
missing.
  • Loading branch information
Riz committed Aug 30, 2020
1 parent 0a59d8c commit 4736cb4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PyInstaller/hooks/hook-sqlalchemy.py
Expand Up @@ -24,6 +24,10 @@
# are not. We should explicitly include database backends.
hiddenimports = ['pysqlite2', 'MySQLdb', 'psycopg2']

# add sqlalchemy.ext.baked to hidden imports
baked = exec_statement('from sqlalchemy.ext import baked')
hiddenimports.append(baked)

# In SQLAlchemy >= 0.6, the "sqlalchemy.dialects" package provides dialects.
if is_module_satisfies('sqlalchemy >= 0.6'):
dialects = exec_statement("import sqlalchemy.dialects;print(sqlalchemy.dialects.__all__)")
Expand Down

0 comments on commit 4736cb4

Please sign in to comment.