2021-02-05 17:12:51 +00:00
{ lib
2022-01-13 20:06:32 +00:00
, botocore
2020-04-24 23:36:52 +00:00
, buildPythonPackage
2022-01-13 20:06:32 +00:00
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
2022-01-25 03:21:06 +00:00
, stdenv
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " s 3 t r a n s f e r " ;
2023-08-10 07:59:29 +00:00
version = " 0 . 6 . 1 " ;
2022-01-13 20:06:32 +00:00
format = " s e t u p t o o l s " ;
2020-04-24 23:36:52 +00:00
2022-01-13 20:06:32 +00:00
disabled = pythonOlder " 3 . 6 " ;
src = fetchFromGitHub {
owner = " b o t o " ;
repo = pname ;
rev = version ;
2023-08-10 07:59:29 +00:00
hash = " s h a 2 5 6 - c L 4 I O f W L R U J C 5 z C z m N / q R f 0 N / I V / M D H F / j 2 J D X 5 h l U E = " ;
2020-04-24 23:36:52 +00:00
} ;
2022-01-25 03:21:06 +00:00
propagatedBuildInputs = [ botocore ] ;
2020-04-24 23:36:52 +00:00
2023-08-10 07:59:29 +00:00
nativeCheckInputs = [ pytestCheckHook ] ;
2020-04-24 23:36:52 +00:00
2022-01-13 20:06:32 +00:00
disabledTestPaths = [
# Requires network access
2023-08-10 07:59:29 +00:00
" t e s t s / i n t e g r a t i o n "
2022-01-25 03:21:06 +00:00
] ++
# There was a change in python 3.8 that defaults multiprocessing to spawn instead of fork on macOS
# See https://bugs.python.org/issue33725 and https://github.com/python/cpython/pull/13603.
# I suspect the underlying issue here is that upstream tests aren't compatible with spawn multiprocessing, and pass on linux where the default is still fork
lib . optionals stdenv . isDarwin [ " t e s t s / u n i t / t e s t _ c o m p a t . p y " ] ;
2020-04-24 23:36:52 +00:00
2022-01-25 03:21:06 +00:00
pythonImportsCheck = [ " s 3 t r a n s f e r " ] ;
2020-04-24 23:36:52 +00:00
2021-02-05 17:12:51 +00:00
meta = with lib ; {
2022-01-13 20:06:32 +00:00
description = " L i b r a r y f o r m a n a g i n g A m a z o n S 3 t r a n s f e r s " ;
2020-04-24 23:36:52 +00:00
homepage = " h t t p s : / / g i t h u b . c o m / b o t o / s 3 t r a n s f e r " ;
2021-02-05 17:12:51 +00:00
license = licenses . asl20 ;
2023-08-10 07:59:29 +00:00
maintainers = with maintainers ; [ nickcao ] ;
2020-04-24 23:36:52 +00:00
} ;
}