python3Packages.ansible-later: fix build

This commit is contained in:
Martin Weinelt 2022-07-20 13:44:36 +02:00
parent 7f641b5101
commit 9f496b05dc

View File

@ -1,4 +1,6 @@
{ lib
, ansible
, ansible-core
, anyconfig
, appdirs
, buildPythonPackage
@ -33,11 +35,25 @@ buildPythonPackage rec {
hash = "sha256-AlLy8rqqNrJtoI01OHq8W1Oi8iN8RiBdtq2sZ7zlTyM=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"' \
--replace " --cov=ansiblelater --cov-report=xml:coverage.xml --cov-report=term --cov-append --no-cov-on-fail" "" \
--replace 'PyYAML = "6.0"' 'PyYAML = "*"' \
--replace 'unidiff = "0.7.3"' 'unidiff = "*"' \
--replace 'jsonschema = "' 'jsonschema = "^' \
--replace 'python-json-logger = "' 'python-json-logger = "^' \
--replace 'toolz = "0.11.2' 'toolz = "*' \
--replace 'yamllint = "' 'yamllint = "^'
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
ansible
ansible-core
anyconfig
appdirs
colorama
@ -57,15 +73,6 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"' \
--replace " --cov=ansiblelater --cov-report=xml:coverage.xml --cov-report=term --cov-append --no-cov-on-fail" "" \
--replace 'PyYAML = "6.0"' 'PyYAML = "*"' \
--replace 'unidiff = "0.7.3"' 'unidiff = "*"' \
--replace 'jsonschema = "' 'jsonschema = "^'
'';
postInstall = ''
rm $out/lib/python*/site-packages/LICENSE
'';