Hi, i'm using pants 2.8 and have issues with depen...
# general
r
Hi, i'm using pants 2.8 and have issues with dependency resolution. i have a package in a custom registry (which unfortunately has a name conflict with a package in pypi, but due to historical reasons and i cannot change it) and use poetry with a constraints file for deps handling. my constraint file has the extra index specified and when i use just an ordinary venv and install everything with pip everything works out fine. however, when using pants, my dependency is simply not recognized, e.g. "Completed: Extracting 5 requirements to build requirements.pex from repository.pex: inflection==0.5.1, ... pantsbuild.pants==2.8.0, pydantic==1.9.0, ... " and here my dependency is missing and i get quite a lot of import-errors (e.g. from the linter and so on). Any ideas how i can debug this properly or what could be a potential issue? cheers,
h
r
Hi, yeah i have the index specified in my pants.toml like this indexes = ["https://basic_authstuff@mypackage.blub/packages/pypi/simple", "https://pypi.org/simple/"] i also have a couple of other custom packages (without this annoying naming conflict), and worked with this for quite some time without any issues)
maybe another issue... my package name does not match the module name... so the import is something like: import mypack.blub but the package name is called mypack-sdk
just found
Copy code
python_requirements(
    module_mapping={"my_distribution": ["custom_module"]},
)
will try out
fyi,
poetry_requirements(
module_mapping={"mypack.blub-sdk": ["mypack.blub"]}
)
did the trick. thanks @hundreds-father-404 for being google for me...