nixpkgs/pkgs/development/python-modules/astral/default.nix
Jonathan Ringer d5ca07e160 pythonPackages.astral: disable for python2
```
  Processing ./astral-2.2-py2-none-any.whl
  ERROR: Package 'astral' requires a different Python: 2.7.18 not in '>=3.6'
```
2020-06-16 13:30:52 -07:00

27 lines
667 B
Nix

{ stdenv, buildPythonPackage, fetchPypi, isPy27, pytz, requests, pytest }:
buildPythonPackage rec {
pname = "astral";
version = "2.2";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "e41d9967d5c48be421346552f0f4dedad43ff39a83574f5ff2ad32b6627b6fbe";
};
propagatedBuildInputs = [ pytz requests ];
checkInputs = [ pytest ];
checkPhase = ''
py.test -m "not webtest"
'';
meta = with stdenv.lib; {
description = "Calculations for the position of the sun and the moon";
homepage = "https://github.com/sffjunkie/astral/";
license = licenses.asl20;
maintainers = with maintainers; [ flokli ];
};
}