adamant-carpenter-58055
01/18/2021, 3:51 PMh2o_pysparkling_2.4
which needs to be mapped using module_mapping
. However, the .
in the package name seems to prevent pants to understand how to do the mapping. Is this intended behaviour? If not, any idea how to get around this?hundreds-father-404
01/18/2021, 3:58 PMadamant-carpenter-58055
01/18/2021, 4:08 PMproject_name
as defined by the 3rd party dependency I'm trying to import? Or should I let pants build a setup.py
file and figure out how it tries to resolve the dependency?hundreds-father-404
01/18/2021, 4:11 PMadamant-carpenter-58055
01/18/2021, 4:22 PMhundreds-father-404
01/18/2021, 4:56 PM❯ pex setuptools
Python 3.9.1 (default, Jan 8 2021, 12:11:08)
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from pkg_resources import Requirement
>>> req = Requirement.parse("h2o_pysparkling_2.4")
>>> req.project_name
'h2o-pysparkling-2.4'
So, this suggests to me that the key in your module_mapping
dictionary should be 'h2o-pysparkling-2.4'
. Could you please try that?adamant-carpenter-58055
01/19/2021, 9:52 AMpex
, so thanks for sharing the example 😄
Might be good to add this as a note to the docs, as this might be the case for more 3rd party requirements 😛