2021-05-07 22:01:44 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, typer
|
|
|
|
, dataclasses
|
2021-03-15 00:01:41 +00:00
|
|
|
, smart-open
|
2021-05-07 22:01:44 +01:00
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
, google-cloud-storage
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pathy";
|
2021-08-26 20:32:40 +01:00
|
|
|
version = "0.6.0";
|
2021-05-07 22:01:44 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-26 20:32:40 +01:00
|
|
|
sha256 = "f83f1eddf77dd86e824143eef8d9adbe0785c3cdd5ec0ed6c0edea3227385048";
|
2021-05-07 22:01:44 +01:00
|
|
|
};
|
|
|
|
|
2021-03-15 00:01:41 +00:00
|
|
|
propagatedBuildInputs = [ smart-open typer google-cloud-storage ];
|
2021-05-07 22:01:44 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-05-07 22:04:10 +01:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "smart-open>=2.2.0,<4.0.0" "smart-open>=2.2.0"
|
2021-05-07 22:01:44 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook mock ];
|
|
|
|
|
|
|
|
# Exclude tests that require provider credentials
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--ignore=pathy/_tests/test_clients.py"
|
|
|
|
"--ignore=pathy/_tests/test_gcs.py"
|
|
|
|
"--ignore=pathy/_tests/test_s3.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Path interface for local and cloud bucket storage";
|
|
|
|
homepage = "https://github.com/justindujardin/pathy";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ melling ];
|
|
|
|
};
|
|
|
|
}
|