Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pypi wheel does not work with third party #1001

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions evadb/third_party/databases/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ def dynamic_install(handler_dir):

INSTALL_CACHE.append(handler_dir)

req_file = os.path.join(
"evadb", "third_party", "databases", handler_dir, "requirements.txt"
)
# Install package using absolute path.
req_file = os.path.join(os.path.dirname(__file__), handler_dir, "requirements.txt")
if os.path.isfile(req_file):
with open(req_file) as f:
for package in f.read().splitlines():
Expand All @@ -62,5 +61,6 @@ def dynamic_install(handler_dir):


def dynamic_import(handler_dir):
# Import package using relative path.
import_path = f"evadb.third_party.databases.{handler_dir}.{handler_dir}_handler"
return importlib.import_module(import_path)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,5 @@ def read(path, encoding="utf-8"):
install_requires=INSTALL_REQUIRES,
extras_require=EXTRA_REQUIRES,
include_package_data=True,
package_data={"evadb": ["evadb.yml", "parser/evadb.lark"]},
package_data={"evadb": ["evadb.yml", "parser/evadb.lark", "third_party/databases/**/requirements.txt"]},
)