3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/hug/default.nix

40 lines
898 B
Nix
Raw Normal View History

2019-09-14 13:56:53 +01:00
{ lib , buildPythonPackage, fetchFromGitHub, isPy27
, falcon
2019-09-13 18:07:30 +01:00
, pytestrunner
, requests
2019-09-14 13:56:53 +01:00
, pytest
, marshmallow
, mock
, numpy
}:
buildPythonPackage rec {
pname = "hug";
2019-09-13 18:07:30 +01:00
version = "2.6.0";
disabled = isPy27;
2019-09-14 13:56:53 +01:00
src = fetchFromGitHub {
owner = "hugapi";
repo = pname;
rev = version;
sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq";
};
2019-09-13 18:07:30 +01:00
nativeBuildInputs = [ pytestrunner ];
propagatedBuildInputs = [ falcon requests ];
2019-09-14 13:56:53 +01:00
checkInputs = [ mock marshmallow pytest numpy ];
checkPhase = ''
mv hug hug.hidden
# some tests attempt network access
PATH=$out/bin:$PATH pytest -k "not (test_request or test_datagram_request)"
'';
2019-09-13 18:07:30 +01:00
meta = with lib; {
description = "A Python framework that makes developing APIs as simple as possible, but no simpler";
homepage = "https://github.com/timothycrosley/hug";
license = licenses.mit;
};
}