at 24.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, protobuf 4, dill 5, grpcio 6, pulumi 7, isPy27 8, semver 9, pip 10, pytestCheckHook 11, pyyaml 12, six 13}: 14buildPythonPackage rec { 15 inherit (pulumi) version src; 16 17 pname = "pulumi"; 18 19 disabled = isPy27; 20 21 propagatedBuildInputs = [ 22 semver 23 protobuf 24 dill 25 grpcio 26 pyyaml 27 six 28 ]; 29 30 nativeCheckInputs = [ 31 pip 32 pulumi.pkgs.pulumi-language-python 33 pytestCheckHook 34 ]; 35 36 pytestFlagsArray = [ 37 "test/" 38 ]; 39 40 sourceRoot = "${src.name}/sdk/python/lib"; 41 42 # we apply the modifications done in the pulumi/sdk/python/Makefile 43 # but without the venv code 44 postPatch = '' 45 cp ../../README.md . 46 substituteInPlace setup.py \ 47 --replace "3.0.0" "${version}" \ 48 --replace "grpcio~=1.59" "grpcio" \ 49 --replace "semver~=2.13" "semver" 50 ''; 51 52 # Allow local networking in tests on Darwin 53 __darwinAllowLocalNetworking = true; 54 55 # Verify that the version substitution works 56 preCheck = '' 57 pip show "${pname}" | grep "Version: ${version}" > /dev/null \ 58 || (echo "ERROR: Version substitution seems to be broken"; exit 1) 59 ''; 60 61 pythonImportsCheck = [ "pulumi" ]; 62 63 meta = with lib; { 64 description = "Modern Infrastructure as Code. Any cloud, any language"; 65 homepage = "https://github.com/pulumi/pulumi"; 66 license = licenses.asl20; 67 maintainers = with maintainers; [ teto ]; 68 }; 69}