Any idea why the dep on BitVector is not inferred?...
# general
Any idea why the dep on BitVector is not inferred?
Copy code
from BitVector import BitVector

bv = BitVector(size=0)

from .bv import bv

def test_it():
    assert bv == 2

# BUILD file
# Works if added manually
#  dependencies=["//:BitVector"]


# Error
E   ModuleNotFoundError: No module named 'BitVector'
The camel case suggests the root dist module does not match the dist name. Does BitVector come from bit-vector?: If so, you'll need a module mapping. If the requirement lives in a requirements.txt, you can do as it says here (search for `module_mapping`: If you want to contribute this mapping so you and other Pants users get it for free, then a PR editing here:
Thanks. It comes from though, which should match?
We assume that the module is
. It's not normal in Python for a module name to have capital letters, so we default to lower casing the dist name Setting module_mapping should fix this
👍 1
If you're feeling energetic, could you send a PR that makes the relevant change to the default mapping at ? Then the next people to use BitVector won't get bitten by this (sort-of pun sort-of intended). We'd really appreciate it!
👍 1