2019-03-01 20:05:35 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, pandas, pytz, six
|
|
|
|
, pytest, mock, pytest-mock }:
|
2018-06-06 12:22:37 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pvlib";
|
2019-02-14 08:37:25 +01:00
|
|
|
version = "0.6.1";
|
2018-06-06 12:22:37 +02:00
|
|
|
|
2019-03-01 20:05:35 +01:00
|
|
|
# Use GitHub because PyPI release tarball doesn't contain the tests. See:
|
|
|
|
# https://github.com/pvlib/pvlib-python/issues/473
|
|
|
|
src = fetchFromGitHub{
|
|
|
|
owner = "pvlib";
|
|
|
|
repo = "pvlib-python";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "17h7vz9s829qxnl4byr8458gzgiismrbrn5gl0klhfhwvc5kkdfh";
|
2018-06-06 12:22:37 +02:00
|
|
|
};
|
|
|
|
|
2019-03-01 20:05:35 +01:00
|
|
|
checkInputs = [ pytest mock pytest-mock ];
|
2018-06-06 12:22:37 +02:00
|
|
|
propagatedBuildInputs = [ numpy pandas pytz six ];
|
|
|
|
|
2019-03-01 20:05:35 +01:00
|
|
|
# Skip a few tests that try to access some URLs
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
pushd pvlib/test
|
|
|
|
pytest . -k "not test_read_srml_dt_index and not test_read_srml_month_from_solardata"
|
|
|
|
popd
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2018-06-06 12:22:37 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|