Open sebastianelsner opened 1 year ago
The reason this operation keeps showing as changed is because the package name in pypi is actually Lucidity
.
Your deployment is using a lowercase version of the name so it's always returning that it needs to be installed.
The quick fix here is to change your deployment to use the actual package name:
pip.packages(
name="Install packages",
packages=["boto3==1.26.27", "Lucidity==1.6.0"],
virtualenv="/tmp/clientvenv",
)
Whether or not this is a bug, or something that should be fixed is another discussion.
Oh good catch! Thank you.
So pyinfra did used to, depending on package manager, lowercase package names. However this behaviour was confusing and resulted in other bugs. That said PyPi's own pep-0426 clearly states package names should be compared insensitively, this would probably require lowercasing input names and fact names...
Describe the bug
Please consider the following code snippet. When run multiple times, installing the packages via pip.packages is reported as "changed" every run.
To Reproduce
Run via
All involved systems are Ubuntu 22.04.
Expected behavior
The packages are found in the given venv and not reported as changed every time. Please tell me I am just not seeing something basic here... I feel dumb, this should be easy :D
Meta
venv + pip install