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