From 9cc79aa79a91032f76edb76eb97bd3dcb2979042 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Mon, 22 Jan 2024 06:39:12 -0500 Subject: [PATCH] actually fix python packaging this time --- MANIFEST.in | 2 +- relay.spec | 2 +- relay/{database => data}/statements.sql | 0 relay/database/__init__.py | 2 +- setup.cfg | 6 ++++-- 5 files changed, 7 insertions(+), 5 deletions(-) rename relay/{database => data}/statements.sql (100%) diff --git a/MANIFEST.in b/MANIFEST.in index fd4498e..83229d2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include database/statements.sql +include data/statements.sql diff --git a/relay.spec b/relay.spec index 7ed9c83..535e5fe 100644 --- a/relay.spec +++ b/relay.spec @@ -9,7 +9,7 @@ a = Analysis( pathex=[], binaries=[], datas=[ - ('relay/database', 'relay/database') + ('relay/data', 'relay/data') ], hiddenimports=[], hookspath=[], diff --git a/relay/database/statements.sql b/relay/data/statements.sql similarity index 100% rename from relay/database/statements.sql rename to relay/data/statements.sql diff --git a/relay/database/__init__.py b/relay/database/__init__.py index c263a96..d69b214 100644 --- a/relay/database/__init__.py +++ b/relay/database/__init__.py @@ -30,7 +30,7 @@ def get_database(config: Config, migrate: Optional[bool] = True) -> tinysql.Data connection_class = Connection ) - db.load_prepared_statements(pkgfiles("relay").joinpath("database", "statements.sql")) + db.load_prepared_statements(pkgfiles("relay").joinpath("data", "statements.sql")) if not migrate: return db diff --git a/setup.cfg b/setup.cfg index 8ca3aad..65874ff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,7 +21,9 @@ project_urls = [options] zip_safe = False -packages = relay +packages = + relay + relay.database include_package_data = true install_requires = file: requirements.txt python_requires = >=3.8 @@ -34,7 +36,7 @@ dev = [options.package_data] relay = - database/statements.sql + data/statements.sql [options.entry_points] console_scripts =