-
Notifications
You must be signed in to change notification settings - Fork 177
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
integration cannot have the same name as package #130
Comments
There are no packages in this example. |
@lbbrhzn did you manage to work around the issue? I have the same problem since upgrading my generated repo using the updated devcontainer.json. I've pinned the problem down to having a from your manifest
@ludeeus I suspect this is related to adding the integration directory to PYTHONPATH due to precedence. Trying to import required package |
@ludeeus Another approach might be using an additional mount in devcontainer.json avoiding the need for usage of both PYTHONPATH and symlinks. I believe it's quite common for integrations and their libs to share the same name in the wild. {
// Mount the path to custom_components
// This let's us have the structure we want <root>/custom_components/integration_blueprint
// while at the same time have Home Assistant configuration inside <root>/config
// without resulting to symlinks.
"mounts": [
"source=${localWorkspaceFolder}/custom_components,target=${containerWorkspaceFolder}/config/custom_components,type=bind,consistency=cached"
],
} |
System Health details
System Information
Home Assistant Cloud
Dashboards
Recorder
Checklist
Describe the issue
i'm trying to modify an integration called ocpp to be in line with integration_blueprint.
This integration has the same name as a python package it depends upon.
I have installed this package using pip, and verified that it is indeed installed.
When starting hass using the develop script provided in this template, I cannot add the integration because elements in the ocpp package cannot be found.
When the integration is installed through hacs, everything works fine.
When I rename the custom_components/ocpp to custom_components/ocpp_integration everything works fine.
I suspect the issue may be related to the modification of PYTHONPATH.
Reproduction steps
Debug logs
Diagnostics dump
not available.
The text was updated successfully, but these errors were encountered: