cool-easter-32542
09/23/2024, 12:41 PMazure-appconfiguration-provider library as a third party dependency to my project. When I execute the run goal to run the application, I have no problems. When I run package to build a pex package, I get the error ModuleNotFoundError: No module named 'azure.appconfiguration.provider'. The library includes a transitive dependency named azure-appconfiguration - my guess is that this transitive dependency is keeping the primary dependency from resolving. I'm new to Pants and Pex, so I'm not sure where this could be happening. I've tried explicitly mapping the module to ensure it is included. Is there any way to explicitly ensure a dependency is included in the Pex package? I'm at a loss for how to resolve this. My relevant configuration is below and am using Pants version 2.21.1. If anyone can shed some light on what could be going on or how to resolve this, I would be eternally grateful.
src/3rdparty/requirements.txt
...
azure-appconfiguration-provider==1.3.0
azure-appconfiguration==1.7.1
...
src/3rdparty/BUILD
python_requirements(
module_mapping={
"azure-appconfiguration-provider": ["azure.appconfiguration.provider"],
},
)
src/application/BUILD
python_sources(
name="application",
sources=["*.py"],
)
pex_binary(
name="local-binary",
entry_point="application.py",
dependencies=[
"src/3rdparty#azure-appconfiguration-provider",
],
)
pantsbuild/pants