depot/third_party/nixpkgs/pkgs/development/python-modules/whitenoise/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01:00

57 lines
1 KiB
Nix

{ lib
, brotli
, buildPythonPackage
, django
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "whitenoise";
version = "6.0.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "evansd";
repo = pname;
rev = version;
hash = "sha256-mUjyX4eQOiMweje6UPyfyJsiHwzF5OQ93KuxFedWxbQ=";
};
propagatedBuildInputs = [
brotli
];
checkInputs = [
django
pytestCheckHook
requests
];
disabledTestPaths = [
# Don't run Django tests
"tests/test_django_whitenoise.py"
"tests/test_runserver_nostatic.py"
"tests/test_storage.py"
];
disabledTests = [
# Test fails with AssertionError
"test_modified"
];
pythonImportsCheck = [
"whitenoise"
];
meta = with lib; {
description = "Radically simplified static file serving for WSGI applications";
homepage = "http://whitenoise.evans.io/";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}