https://pantsbuild.org/ logo
#general
Title
# general
g

gentle-painting-24549

11/29/2022, 5:54 PM
We’ve got a bit of a different directory structure than most pants repos, but my build file @
packages/example/BUILD
looks like this:
Copy code
python_sources(
    name="lib",
    sources=[
        "example/**/*.py",
        "example/*.py",
    ],
)

python_tests(
    name="tests",
    sources=[
        "tests/**/test_*.py",
        "tests/test_*.py",
    ],
    dependencies=[
        "requirements:reqs#python-gdcm",
    ],
)


python_distribution(
    name="dist",
    dependencies=[
        ":lib",
    ],
    provides=setup_py(
        name="example",
        version="0.0.0",
    ),
    generate_setup=True,
)
And my BUILD file @
requirements/BUILD
looks like this:
Copy code
python_requirements(
    name="reqs",
    source="requirements.txt",
    module_mapping={
        "python-gdcm": ["gdcm"],
    },
)
👀 1