python3Packages.pulumi: fix the version number in setup.py (#176709)

the substituteInPlace didn't work for some reason, thus the deduced version became a negative one , i.e., -3.31 . Pulumi worked but then pulumi_aws was complaining that pulumi bounds were not respected.
I use sed as is done in pulumi/pulumi@d6a112c/sdk/python/Makefile#L31 to fix the issue. Now python3Packages.pulumi-aws accepts the version of pulumi and builds.
This commit is contained in:
Matthieu Coudron 2022-06-09 03:10:04 +02:00 committed by GitHub
parent 7d071e7b62
commit e3aa43fd23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,20 +66,19 @@ buildPythonPackage rec {
black
];
pythonImportsCheck = ["pulumi"];
sourceRoot="source/sdk/python/lib";
# we apply the modifications done in the pulumi/sdk/python/Makefile
# but without the venv code
postPatch = ''
cp README.md sdk/python/lib
patchShebangs .
cd sdk/python/lib
substituteInPlace setup.py \
--replace "{VERSION}" "${version}"
cp ../../README.md .
sed -i "s/\''${VERSION}/${version}/g" setup.py
'';
# disabled because tests try to fetch go packages from the net
doCheck = false;
pythonImportsCheck = ["pulumi"];
meta = with lib; {
description = "Modern Infrastructure as Code. Any cloud, any language";
homepage = "https://github.com/pulumi/pulumi";