mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
python310Packages.pulumi: use pulumi
instead of pulumi-bin
This commit is contained in:
parent
08328db2a4
commit
9d67386657
@ -1,42 +1,22 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchpatch
|
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, protobuf
|
, protobuf
|
||||||
, dill
|
, dill
|
||||||
, grpcio
|
, grpcio
|
||||||
, pulumi-bin
|
, pulumi
|
||||||
, isPy27
|
, isPy27
|
||||||
, semver
|
, semver
|
||||||
|
, pytestCheckHook
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, six
|
, six
|
||||||
|
|
||||||
|
|
||||||
# for tests
|
|
||||||
, go
|
|
||||||
, pulumictl
|
|
||||||
, pylint
|
|
||||||
, pytest
|
|
||||||
, pytest-timeout
|
|
||||||
, wheel
|
|
||||||
, pytest-asyncio
|
|
||||||
|
|
||||||
, mypy
|
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
data = import ./data.nix {};
|
|
||||||
in
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pulumi";
|
inherit (pulumi) version src;
|
||||||
version = pulumi-bin.version;
|
|
||||||
disabled = isPy27;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
pname = "pulumi";
|
||||||
owner = "pulumi";
|
|
||||||
repo = "pulumi";
|
disabled = isPy27;
|
||||||
rev = "v${pulumi-bin.version}";
|
|
||||||
sha256 = "sha256-vqEZEHTpJV65a3leWwYhyi3dzAsN67BXOvk5hnTPeuI=";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
semver
|
semver
|
||||||
@ -48,28 +28,35 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pulumi-bin
|
pulumi.pkgs.pulumi-language-python
|
||||||
pulumictl
|
pytestCheckHook
|
||||||
mypy
|
|
||||||
go
|
|
||||||
pytest
|
|
||||||
pytest-timeout
|
|
||||||
pytest-asyncio
|
|
||||||
wheel
|
|
||||||
];
|
];
|
||||||
|
|
||||||
sourceRoot="source/sdk/python/lib";
|
pytestFlagsArray = [
|
||||||
|
"test/"
|
||||||
|
];
|
||||||
|
|
||||||
|
sourceRoot = "source/sdk/python/lib";
|
||||||
|
|
||||||
# we apply the modifications done in the pulumi/sdk/python/Makefile
|
# we apply the modifications done in the pulumi/sdk/python/Makefile
|
||||||
# but without the venv code
|
# but without the venv code
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
cp ../../README.md .
|
cp ../../README.md .
|
||||||
sed -i "s/\''${VERSION}/${version}/g" setup.py
|
substituteInPlace setup.py \
|
||||||
|
--replace "3.0.0" "${version}" \
|
||||||
|
--replace "grpcio==1.47" "grpcio"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# disabled because tests try to fetch go packages from the net
|
# Allow local networking in tests on Darwin
|
||||||
doCheck = false;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
pythonImportsCheck = ["pulumi"];
|
# Verify that the version substitution works
|
||||||
|
preCheck = ''
|
||||||
|
pip show "${pname}" | grep "Version: ${version}" > /dev/null \
|
||||||
|
|| (echo "ERROR: Version substitution seems to be broken"; exit 1)
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pulumi" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Modern Infrastructure as Code. Any cloud, any language";
|
description = "Modern Infrastructure as Code. Any cloud, any language";
|
||||||
|
@ -1070,7 +1070,7 @@ self: super: with self; {
|
|||||||
|
|
||||||
pad4pi = callPackage ../development/python-modules/pad4pi { };
|
pad4pi = callPackage ../development/python-modules/pad4pi { };
|
||||||
|
|
||||||
pulumi = callPackage ../development/python-modules/pulumi { };
|
pulumi = callPackage ../development/python-modules/pulumi { inherit (pkgs) pulumi; };
|
||||||
|
|
||||||
pulumi-aws = callPackage ../development/python-modules/pulumi-aws { };
|
pulumi-aws = callPackage ../development/python-modules/pulumi-aws { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user