rich-church-77699
08/05/2021, 4:10 PMpants
they fail due to the error below, which appears to be due to missing setuptools
in the pants virtualenv
I am using poetry version 1.2.0a2
to generate a constraints.txt
which contains setuptools
as a requirement
Is there a reason why pants is not installing setuptools in the virtualenv?
import pkg_resources
EΒ Β ModuleNotFoundError: No module named 'pkg_resources'
/home/vagrant/.cache/pants/named_caches/pex_root/venvs/short/041f67f1/lib/python3.8/site-packages/moto/core/models.py:8: ModuleNotFoundError
clean-city-64472
08/05/2021, 4:18 PMclean-city-64472
08/05/2021, 4:18 PMmoto
does not include setuptools in its requirements (even though it should)rich-church-77699
08/05/2021, 6:46 PMpython_tests(
name="test"
dependencies=["//:setuptools"],
)
happy-kitchen-89482
08/05/2021, 8:05 PMhappy-kitchen-89482
08/05/2021, 8:05 PMsetuptools
when they should, moto is not the only culprit.clean-city-64472
08/05/2021, 8:06 PMrich-church-77699
08/06/2021, 9:45 AMversion 1.2.0a2
as when exporting the lock file to constraints.txt
in current versions of poetry it would not export setuptools
it was resolved here
Using the preview version of poetry introduced another issue, they have renamed where dev dependencies are stored in pyproject.toml
to [tool.poetry.group.dev.dependencies]
which means pants can't pick up the package until it is manually moved under [tool.poetry.dev-dependencies]
hundreds-father-404
08/06/2021, 1:57 PM