Merge pull request #66645 from WhittlesJr/python-easysnmp-and-poster3

pythonPackages.easysnmp: init at 0.2.5; python3Packages.poster3: init at 0.8.1
This commit is contained in:
Linus Heckemann
2019-11-05 10:32:08 +01:00
committed by GitHub
4 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
{ stdenv
, lib
, buildPythonPackage
, pythonAtLeast
, fetchFromGitHub
, net_snmp
, openssl
, pytest
, pytestcov
, pytest-flake8
, pytest-sugar
, termcolor
}:
buildPythonPackage rec {
pname = "easysnmp";
version = "0.2.5";
# See https://github.com/kamakazikamikaze/easysnmp/issues/108
disabled = pythonAtLeast "3.7";
src = fetchFromGitHub {
owner = "kamakazikamikaze";
repo = pname;
rev = version;
sha256 = "1si9iyxqj6z22jzn6m93lwpinsqn20lix2py3jm3g3fmwawkd735";
};
checkInputs = [
pytest
pytestcov
pytest-flake8
pytest-sugar
termcolor
];
buildInputs = [
net_snmp
openssl
];
buildPhase = ''
python setup.py build bdist_wheel --basedir=${net_snmp}/bin
'';
# Unable to get tests to pass, even running by hand. The pytest tests have
# become stale.
doCheck = false;
meta = with lib; {
description = "A blazingly fast and Pythonic SNMP library based on the official Net-SNMP bindings";
homepage = https://easysnmp.readthedocs.io/en/latest/;
license = licenses.bsd3;
maintainers = with maintainers; [ WhittlesJr ];
};
}

View File

@@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, paste
, webob
, pyopenssl
}:
buildPythonPackage rec {
pname = "poster3";
version = "0.8.1";
format = "wheel"; # only redistributable available
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
format = "wheel";
python = "py3";
sha256 = "1b27d7d63e3191e5d7238631fc828e4493590e94dcea034e386c079d853cce14";
};
checkInputs = [
paste
webob
pyopenssl
];
meta = with lib; {
description = "Streaming HTTP uploads and multipart/form-data encoding";
homepage = https://atlee.ca/software/poster/;
license = licenses.mit;
maintainers = with maintainers; [ WhittlesJr ];
};
}