<#20478 Catch valid but nonsense interpreter_const...
# github-notifications
c
#20478 Catch valid but nonsense interpreter_constraints at build time Issue created by jogo Is your feature request related to a problem? Please describe. If I have
interpreter_constraints = ["CPython>=3.10"]
pants.toml and a BUILD file like this:
Copy code
python_sources(
    name='my_source',
)

pex_binary(
    name='my_pex',
    dependencies=[
        ':my)source',
    ],
    entry_point='main:main',
)

python_distribution(
    name='my_package',
    dependencies=[
        ':support_bot_src',
    ],
    provides=setup_py(name='my_package'),
    interpreter_constraints=["CPython>=3.9"],
)
we build a wheel with
Requires-Python >=3.9,>=3.10
because the interpreter_constraints from
my_package
and
python_sources
(via
pants.toml
) are concatenated together. This means the package won't install on python 3.9 Describe the solution you'd like It would be really helpful if pants either didn't build your package and instead emitted a warning since this set of interpreter constraints isn't actually meaningful or it emitted a warning by default. Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Currently it's a trial and error process to sort this out Additional context Add any other context or screenshots about the feature request here. pantsbuild/pants