Alien6-Studio / outerspace-apizr

OuterSpace APIzr
https://apizr.outerspace.sh/
3 stars 0 forks source link

[FEAT] Enhance support for Python projects using local modules to ensure their inclusion in the container #12

Closed Coopyrightdmin closed 1 year ago

Coopyrightdmin commented 1 year ago

Problem Statement

At present, when Python projects utilize local modules, these modules are not automatically incorporated into the container. This can lead to missing dependencies and potential runtime errors, obstructing the seamless execution of Python applications within the container.

Benefits

Improving the handling of local Python modules would:

Additional context

Local modules are crucial components of Python projects, encapsulating specific functionalities or utilities. Their omission or mishandling can disrupt the proper functioning of the main application. Ensuring their accurate inclusion is paramount for the reliability of the containerized application.

Priority/Severity

Coopyrightdmin commented 1 year ago

Within main.py at root level, we've implemented a solution to automatically detect and include local modules during the container creation process. The logic to identify local modules relies on attempting to import the modules. If the import fails, it likely indicates a local module, which we then copy into the output directory. This approach ensures that all necessary dependencies, including local modules, are correctly accounted for during container creation.