From bebd6ca0e1a0612ee2329267edcb20b0149afc46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:05:43 -0500 Subject: [PATCH] Use MANIFEST.in to identify package data, allows recursive include (#9021) (#9026) * changelog * use MANIFEST.in to identify package data (cherry picked from commit 839c720e915d50e421cb6d831cb754eed49ddd35) Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com> --- .changes/unreleased/Fixes-20231107-094130.yaml | 7 +++++++ plugins/postgres/MANIFEST.in | 1 + plugins/postgres/setup.py | 9 +-------- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .changes/unreleased/Fixes-20231107-094130.yaml create mode 100644 plugins/postgres/MANIFEST.in diff --git a/.changes/unreleased/Fixes-20231107-094130.yaml b/.changes/unreleased/Fixes-20231107-094130.yaml new file mode 100644 index 00000000000..c32d62de52f --- /dev/null +++ b/.changes/unreleased/Fixes-20231107-094130.yaml @@ -0,0 +1,7 @@ +kind: Fixes +body: Use MANIFEST.in to recursively include all jinja templates; fixes issue where + some templates were not included in the distribution +time: 2023-11-07T09:41:30.121733-05:00 +custom: + Author: mikealfare + Issue: "9016" diff --git a/plugins/postgres/MANIFEST.in b/plugins/postgres/MANIFEST.in new file mode 100644 index 00000000000..96f39441d58 --- /dev/null +++ b/plugins/postgres/MANIFEST.in @@ -0,0 +1 @@ +recursive-include dbt/include *.sql *.yml diff --git a/plugins/postgres/setup.py b/plugins/postgres/setup.py index 23c03d246fc..9a0a1f5f044 100644 --- a/plugins/postgres/setup.py +++ b/plugins/postgres/setup.py @@ -60,14 +60,7 @@ def _dbt_psycopg2_name(): author_email="info@dbtlabs.com", url="https://github.com/dbt-labs/dbt-core", packages=find_namespace_packages(include=["dbt", "dbt.*"]), - package_data={ - "dbt": [ - "include/postgres/dbt_project.yml", - "include/postgres/sample_profiles.yml", - "include/postgres/macros/*.sql", - "include/postgres/macros/**/*.sql", - ] - }, + include_package_data=True, install_requires=[ "dbt-core=={}".format(package_version), "{}~=2.8".format(DBT_PSYCOPG2_NAME),