Skip to content

Commit

Permalink
fix alembic path and packaging issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bouttier committed Nov 21, 2022
1 parent 19eb3fb commit 038c0ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apptax/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import logging
from pkg_resources import iter_entry_points
from pathlib import Path

from flask import Flask, current_app
from flask_cors import CORS
Expand Down Expand Up @@ -52,7 +53,7 @@ def create_app():
app.wsgi_app = ProxyFix(app.wsgi_app, x_host=1)

db.init_app(app)
migrate.init_app(app, db, directory="apptax/migrations")
migrate.init_app(app, db, directory=Path(__file__).absolute().parent / "migrations")
CORS(app, supports_credentials=True)

app.config["DB"] = db
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
packages=setuptools.find_packages(where=".", include=["apptax*"]),
package_data={
"apptax": ["templates/*.html"],
"apptax.migrations": ["data/*.sql"],
"apptax.migrations": ["alembic.ini", "script.py.mako", "data/*.sql"],
"apptax.taxonomie.commands.migrate_to_v15": ["data/*.sql"],
},
install_requires=(
Expand Down

0 comments on commit 038c0ba

Please sign in to comment.