about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2022-06-09 03:10:04 +0200
committerGitHub <noreply@github.com>2022-06-09 03:10:04 +0200
commite3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2 (patch)
treed9bd8d40b201cc0237ac25af2602c6180a7f036d
parent7d071e7b625b8e8d37bdaee9900b8287d029f0c6 (diff)
downloadnixlib-e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2.tar
nixlib-e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2.tar.gz
nixlib-e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2.tar.bz2
nixlib-e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2.tar.lz
nixlib-e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2.tar.xz
nixlib-e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2.tar.zst
nixlib-e3aa43fd2380c42e7fc7f3ca1a95df765a3cafa2.zip
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.
-rw-r--r--pkgs/development/python-modules/pulumi/default.nix15
1 files 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";