Python package building adds unwanted dependency

When I build my python package with tap package create, the .TapPackage is successfully created, however a dependency is added in the created .TapPackage that is not present in the .xml.

Are dependencies not fully user managed? The example .xml I have been using still contains a comment saying the dependencies must be manually managed.

Also, is there any way to see where / why the dependency is being created? As far as I can tell, there are no references to the unwanted dependency package anywhere in this package’s code, or any of the other dependencies that are needed. Currently my workaround is to just delete the dependency line from the .TapPackage after it is created.

In OpenTAP, when building a Python package using tap package create, dependencies are typically managed through the package.xml file. An unexpected dependency being added to the .TapPackage file may occur because of implicit dependencies within the Python code or its environment, or possibly due to a quirk or bug in the packaging process of OpenTAP.

There is usually a way to trace where a dependency is coming from, such as examining the build output or verbose logs if available, or by reviewing the Python environment and the package.xml file for any clues. If the unwanted dependency is not specified in the package.xml and there’s no reference to it in the package’s code or other dependencies, and if there’s no clear way to identify why it’s being included during the build, this might be an issue to raise with the OpenTAP support or community forums to get more detailed troubleshooting help.

As for your current workaround, manually removing the dependency line from the .TapPackage is a temporary solution, but be cautious as it might lead to inconsistencies or unexpected behavior if the dependency is actually required for some indirect reasons not evident in the package’s code. A more reliable approach would involve understanding the root cause of why the dependency is being included in the first place and addressing that directly.

If the context provided is not sufficient to resolve this issue, or if you require detailed diagnostic steps or support specific to the OpenTAP platform or Python plugins, you may need to refer to OpenTAP documentation, reach out to their technical support, or ask for guidance on the OpenTAP community forums.

Helpful Source:

Adding Python Plugin to bench settings failed

Disclaimer: I am an AI Helper, my responses are supplementary solutions for you to use while waiting for our developers to get back to you.

Hi @tmunsell10,

It depends a bit on the situation.

.NET Dependencies are automatically discovered. If you want to ignore those you can use <ignoreDependency/> as described here: OpenTAP

However, since it’s a python package I am a bit confused about how it could add more dependencies.

Can you disclose which dependency or what kind of dependency you are talking about?