nixpkgs/pkgs/development/python-modules/atpublic/default.nix
2023-09-27 15:32:49 +02:00

54 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, pdm-backend
, sybil
, typing-extensions
}:
buildPythonPackage rec {
pname = "atpublic";
version = "4.0";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-D0BDMhnhJO3xFcbDY4CMpvDhz6fRYNhrL7lHkwhtEpQ=";
};
nativeBuildInputs = [
pdm-backend
];
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
sybil
];
postPatch = ''
sed -i '/cov=public/d' pyproject.toml
'';
pythonImportsCheck = [
"public"
];
meta = with lib; {
description = "Python decorator and function which populates a module's __all__ and globals";
homepage = "https://public.readthedocs.io/";
longDescription = ''
This is a very simple decorator and function which populates a module's
__all__ and optionally the module globals.
'';
license = licenses.asl20;
maintainers = with maintainers; [ eadwu ];
};
}