python3Packages.pyhumps: init at 3.5.0

This commit is contained in:
Fabian Affolter 2022-02-08 17:08:10 +01:00 committed by Jonathan Ringer
parent e9a32bb715
commit fb0ddd271e
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyhumps";
version = "3.5.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "nficano";
repo = "humps";
rev = "v${version}";
hash = "sha256-dnNtx0VTD2e89yXMz0+acDhOaLBSkAA7n2io6qypN5E=";
};
nativeBuildInputs = [
poetry-core
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
# https://github.com/nficano/humps/pull/240
substituteInPlace pyproject.toml \
--replace 'version = "3.0.2"' 'version = "${version}"'
'';
pythonImportsCheck = [
"humps"
];
meta = with lib; {
description = "Module to convert strings (and dictionary keys) between snake case, camel case and pascal case";
homepage = "https://github.com/nficano/humps";
license = with licenses; [ unlicense ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -6104,6 +6104,8 @@ in {
pyhiveapi = callPackage ../development/python-modules/pyhiveapi { };
pyhumps = callPackage ../development/python-modules/pyhumps { };
pyisy = callPackage ../development/python-modules/pyisy { };
pykrakenapi = callPackage ../development/python-modules/pykrakenapi { };