nixpkgs/pkgs/development/python-modules/pvlib/default.nix

35 lines
1.0 KiB
Nix
Raw Normal View History

2019-09-07 12:31:25 +01:00
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, numpy, pandas, pytz, six
, pytest, mock, pytest-mock, requests }:
2018-06-06 11:22:37 +01:00
buildPythonPackage rec {
pname = "pvlib";
2020-03-09 15:03:34 +00:00
version = "0.7.1";
2018-06-06 11:22:37 +01:00
2019-09-07 12:31:25 +01:00
# Support for Python <3.5 dropped in 0.6.3 on June 1, 2019.
disabled = pythonOlder "3.5";
src = fetchPypi{
inherit pname version;
2020-03-09 15:03:34 +00:00
sha256 = "1kqwnkbkdv4m3r68pd39va6wqvhr34a6hx4d6q5lfkibclg35c3d";
2018-06-06 11:22:37 +01:00
};
checkInputs = [ pytest mock pytest-mock ];
2019-09-07 12:31:25 +01:00
propagatedBuildInputs = [ numpy pandas pytz six requests ];
2018-06-06 11:22:37 +01:00
# Skip a few tests that try to access some URLs
checkPhase = ''
runHook preCheck
2020-03-09 15:03:34 +00:00
pushd pvlib/tests
pytest . -k "not test_read_srml_dt_index and not test_read_srml_month_from_solardata and not test_get_psm3 and not test_pvgis"
popd
runHook postCheck
'';
2018-06-06 11:22:37 +01:00
meta = with stdenv.lib; {
homepage = "https://pvlib-python.readthedocs.io";
2018-06-06 11:22:37 +01:00
description = "Simulate the performance of photovoltaic energy systems";
license = licenses.bsd3;
maintainers = with maintainers; [ jluttine ];
};
}