2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchpatch
|
|
|
|
, google-cloud-storage
|
|
|
|
, mock
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2021-05-28 09:39:13 +00:00
|
|
|
, smart-open
|
2022-04-27 09:35:20 +00:00
|
|
|
, typer
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pathy";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "0.6.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "838624441f799a06b446a657e4ecc9ebc3fdd05234397e044a7c87e8f6e76b1c";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
smart-open
|
|
|
|
typer
|
|
|
|
google-cloud-storage
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
patches = [
|
|
|
|
# Support for smart-open >= 6.0.0, https://github.com/justindujardin/pathy/pull/71
|
|
|
|
(fetchpatch {
|
|
|
|
name = "support-later-smart-open.patch";
|
|
|
|
url = "https://github.com/justindujardin/pathy/commit/ba1c23df6ee5d1e57bdfe845ff6a9315cba3df6a.patch";
|
|
|
|
sha256 = "sha256-V1i4tx73Xkdqb/wZhQIv4p6FVpF9SEfDhlBkwaaRE3w=";
|
|
|
|
})
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Exclude tests that require provider credentials
|
|
|
|
"pathy/_tests/test_clients.py"
|
|
|
|
"pathy/_tests/test_gcs.py"
|
|
|
|
"pathy/_tests/test_s3.py"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pathy"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|