depot/third_party/nixpkgs/pkgs/development/python-modules/pendulum/default.nix
Default email 0eaa97ffad Project import generated by Copybara.
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
2020-08-20 19:08:02 +02:00

37 lines
792 B
Nix

{ lib, fetchPypi, buildPythonPackage, pythonOlder
, dateutil
, importlib-metadata
, poetry
, poetry-core
, pytzdata
, typing
}:
buildPythonPackage rec {
pname = "pendulum";
version = "2.1.2";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207";
};
preBuild = ''
export HOME=$TMPDIR
'';
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [ dateutil pytzdata ]
++ lib.optional (pythonOlder "3.5") typing
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
# No tests
doCheck = false;
meta = with lib; {
description = "Python datetimes made easy";
homepage = "https://github.com/sdispater/pendulum";
license = licenses.mit;
};
}