python37Packages.pendulum: fix build add tests

This commit is contained in:
Jonathan Ringer 2020-08-11 12:13:58 -07:00 committed by Jon
parent 20d25c3a8e
commit fe8f927a6a

View file

@ -1,24 +1,30 @@
{ lib, fetchPypi, buildPythonPackage, pythonOlder { lib, fetchPypi, buildPythonPackage, pythonOlder
, dateutil, pytzdata, typing , dateutil
, importlib-metadata
, poetry
, poetry-core , poetry-core
, pytzdata
, typing
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pendulum"; pname = "pendulum";
version = "2.1.2"; version = "2.1.2";
format = "pyproject"; format = "pyproject";
nativeBuildInputs = [
poetry-core
];
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207"; sha256 = "b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207";
}; };
propagatedBuildInputs = [ dateutil pytzdata ] ++ lib.optional (pythonOlder "3.5") typing; 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 # No tests
doCheck = false; doCheck = false;