Merge pull request #70258 from juaningan/restrictedpython

home-assistant: add support for python_script component
This commit is contained in:
Peter Hoeg
2020-01-09 10:50:17 +08:00
committed by GitHub
3 changed files with 37 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchPypi
# Test dependencies
, pytest, pytest-mock
}:
buildPythonPackage rec {
pname = "RestrictedPython";
version = "5.0";
src = fetchPypi {
inherit pname version;
sha256 = "1g0sffn6ifkl1w8gq15rpaqm8c7l68bsnm77wcd3flyzzydmd050";
};
#propagatedBuildInputs = [ xmltodict requests ifaddr ];
checkInputs = [
pytest pytest-mock
];
checkPhase = ''
pytest
'';
meta = {
homepage = https://github.com/zopefoundation/RestrictedPython;
description = "A restricted execution environment for Python to run untrusted code";
license = lib.licenses.zpl21;
maintainers = with lib.maintainers; [ juaningan ];
};
}