pan-python + pan-os-python: init at 0.25.0 + 1.12.3 (#417566)
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
packaging,
|
||||
pan-python,
|
||||
poetry-core,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pan-os-python";
|
||||
version = "1.12.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "pan_os_python";
|
||||
inherit version;
|
||||
hash = "sha256-b3jHu//GX031UbApDzYjCUXpI5MOdHwk9mXVymsFttk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# Modernize project definition
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api' \
|
||||
--replace-fail 'poetry>=0.12' 'poetry-core' \
|
||||
--replace-fail 'pan-python = "^0.17.0"' 'pan-python = "^0.25.0"'
|
||||
substituteInPlace panos/__init__.py \
|
||||
--replace-fail "from distutils.version import LooseVersion" "from packaging.version import Version as LooseVersion"
|
||||
'';
|
||||
|
||||
dependencies = [
|
||||
packaging
|
||||
pan-python
|
||||
];
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
pythonImportsCheck = [ "panos" ];
|
||||
|
||||
meta = {
|
||||
description = "Palo Alto Networks PAN-OS SDK for Python";
|
||||
homepage = "https://github.com/PaloAltoNetworks/pan-os-python";
|
||||
changelog = "https://github.com/PaloAltoNetworks/pan-os-python/releases/tag/v${version}";
|
||||
license = lib.licenses.isc;
|
||||
maintainers = with lib.maintainers; [ jherland ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchurl,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pan-python";
|
||||
version = "0.25.0";
|
||||
format = "wheel";
|
||||
|
||||
# fetchPypi doesn't appear to work, possibly because the uploaded archives on PyPI
|
||||
# are named (notice '_' vs. '-'):
|
||||
# - pan-python-0.25.0.tar.gz
|
||||
# - pan_python-0.25.0-py3-none-any.whl
|
||||
src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/68/b0/0af75e586869bc5eee67e75472771e820189cbedbdde619353191a2828b7/pan_python-0.25.0-py3-none-any.whl";
|
||||
hash = "sha256-IWqXsFORXzo8n+J39ZaqAK1vD1uIxy3idtt1+Sq5x+0=";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "pan" ];
|
||||
|
||||
meta = {
|
||||
description = "Python package for Palo Alto Networks Next-Generation Firewalls, WildFire and AutoFocus";
|
||||
homepage = "https://github.com/kevinsteves/pan-python";
|
||||
changelog = "https://github.com/kevinsteves/pan-python/releases/tag/v${version}";
|
||||
license = lib.licenses.isc;
|
||||
maintainers = with lib.maintainers; [ jherland ];
|
||||
};
|
||||
}
|
||||
@@ -11260,6 +11260,10 @@ self: super: with self; {
|
||||
|
||||
pamqp = callPackage ../development/python-modules/pamqp { };
|
||||
|
||||
pan-os-python = callPackage ../development/python-modules/pan-os-python { };
|
||||
|
||||
pan-python = callPackage ../development/python-modules/pan-python { };
|
||||
|
||||
panacotta = callPackage ../development/python-modules/panacotta { };
|
||||
|
||||
panasonic-viera = callPackage ../development/python-modules/panasonic-viera { };
|
||||
|
||||
Reference in New Issue
Block a user