databricks-industry-solutions / x12-edi-parser

Used for reading & writing X12 messages
Other
7 stars 1 forks source link

databricksx12.hls package is missing from the pip installation #13

Closed kenatlogix closed 1 month ago

kenatlogix commented 2 months ago

Did the pip installation as guided: pip install git+https://github.com/databricks-industry-solutions/x12-edi-parser

But then for the import modules as below: from databricksx12.hls import * , it errored out: ModuleNotFoundError: No module named 'databricksx12.hls'

Found that setup.py misses the package. A workaround I made, copied the missing folder, .../databrickx12/hls, from the source code repo and manually located in the installation path.

The setup.py code should be modified as below:

from setuptools import setup, find_packages from io import open from os import path import sys

this_directory = path.abspath(path.dirname(file)) with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: LONG_DESCRIPTION = f.read()

setup( name="databricksx12", version="0.0.1", ... ... ],

packages=['databricksx12'],

**packages=find_packages()**
#py_modules=['databricksx12']

)

zavoraad commented 1 month ago

Hi @kenatlogix , sorry for the late reply didn't have notifications on.

Setup.py is modified on hotfix13 branch to include databricksx12.hls as a package. Can you confirm you can import after installing from this branch?

pip install git+https://github.com/databricks-industry-solutions/x12-edi-parser.git@hotfix13
from databricksx12.hls import *
kenatlogix commented 1 month ago

Hi @zavoraad , Thanks for the info and the fix. I have verified it. !