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.

authored by

Matthieu Coudron and committed by
GitHub
e3aa43fd 7d071e7b

+7 -8
+7 -8
pkgs/development/python-modules/pulumi/default.nix
··· 66 66 black 67 67 ]; 68 68 69 - pythonImportsCheck = ["pulumi"]; 70 - 69 + sourceRoot="source/sdk/python/lib"; 70 + # we apply the modifications done in the pulumi/sdk/python/Makefile 71 + # but without the venv code 71 72 postPatch = '' 72 - cp README.md sdk/python/lib 73 - patchShebangs . 74 - cd sdk/python/lib 75 - 76 - substituteInPlace setup.py \ 77 - --replace "{VERSION}" "${version}" 73 + cp ../../README.md . 74 + sed -i "s/\''${VERSION}/${version}/g" setup.py 78 75 ''; 79 76 80 77 # disabled because tests try to fetch go packages from the net 81 78 doCheck = false; 79 + 80 + pythonImportsCheck = ["pulumi"]; 82 81 83 82 meta = with lib; { 84 83 description = "Modern Infrastructure as Code. Any cloud, any language";