nixpkgs/pkgs/development/python-modules/freezegun/default.nix
Jonathan Ringer 38ab53776e pythonPackages.freezegun: disable python2
```
  Processing ./freezegun-1.0.0-py2.py3-none-any.whl
  ERROR: Package 'freezegun' requires a different Python: 2.7.18 not in '>=3.5'
```
2020-12-01 08:14:10 -08:00

35 lines
678 B
Nix

{ stdenv
, buildPythonPackage
, pythonOlder
, fetchPypi
, isPy27
, dateutil
, six
, mock
, nose
, pytest
}:
buildPythonPackage rec {
pname = "freezegun";
version = "1.0.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "1cf08e441f913ff5e59b19cc065a8faa9dd1ddc442eaf0375294f344581a0643";
};
propagatedBuildInputs = [ dateutil six ];
checkInputs = [ mock nose pytest ];
# contains python3 specific code
doCheck = !isPy27;
meta = with stdenv.lib; {
description = "FreezeGun: Let your Python tests travel through time";
homepage = "https://github.com/spulec/freezegun";
license = licenses.asl20;
};
}