From b05d668b2f6149a897944a67af862763ec35f9a7 Mon Sep 17 00:00:00 2001 From: Rishabh Srivastava Date: Wed, 6 Dec 2023 18:51:59 +0800 Subject: [PATCH] updated setup to include all nextjs static files --- setup.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3379f76..a7fccc0 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +import os from setuptools import find_packages, setup extras = { @@ -8,11 +9,24 @@ "redshift": ["psycopg2-binary"], } + +def package_files(directory): + paths = [] + for path, directories, filenames in os.walk(directory): + for filename in filenames: + paths.append(os.path.join("..", path, filename)) + return paths + + +next_static_files = package_files("defog/static") + +print(next_static_files) + setup( name="defog", packages=find_packages(), - package_data={"defog": ["gcp/*", "aws/*", "static/*"]}, - version="0.54.0", + package_data={"defog": ["gcp/*", "aws/*"] + next_static_files}, + version="0.54.3", description="Defog is a Python library that helps you generate data queries from natural language questions.", author="Full Stack Data Pte. Ltd.", license="MIT",