Closed
Description
Describe the bug
While using this package as a dependency it is impossible to use another one which also has com
folder in its source code.
The problem occurs mostly in editable installation mode.
These sub-packages contain an __init__.py
file making fail any other packages with com.company
namespace :
vapi-common-client-.zip
vcenter_bindings-.zip
vmwarecloud_aws-.zip
vmwarecloud_draas-.zip
The __init__.py
file :
# Required to distribute different parts of this
# package as multiple distributables
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
There shouldn't be any __init__.py
file in the "com" folder. This latter is "universal" and can be used by many others.
Reproduction steps
- pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
- pip install --editable path-to-my-other-package-containing
com.compagny
namespace python -c "from com.company.mypackage.mymodule import my_function, my_class"
Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'com.company'
Expected behavior
from com.company.mypackage.mymodule import my_function, my_class
should be possible.
Additional context
No response