From e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Thu, 9 Jun 2022 03:10:04 +0200 Subject: [PATCH] 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. --- .../development/python-modules/pulumi/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pulumi/default.nix b/pkgs/development/python-modules/pulumi/default.nix index e38157c69071..3fb33af88958 100644 --- a/pkgs/development/python-modules/pulumi/default.nix +++ b/pkgs/development/python-modules/pulumi/default.nix @@ -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";