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
, docutils
2022-01-13 20:06:32 +00:00
, fetchFromGitHub
2020-04-24 23:36:52 +00:00
, mock
2022-01-13 20:06:32 +00:00
, pytestCheckHook
, pythonOlder
2022-01-25 03:21:06 +00:00
, stdenv
2020-04-24 23:36:52 +00:00
, wheel
} :
buildPythonPackage rec {
pname = " s 3 t r a n s f e r " ;
2021-09-18 10:52:07 +00:00
version = " 0 . 5 . 0 " ;
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 ;
hash = " s h a 2 5 6 - 0 D l 7 o K B 2 x x q / a 8 d o 3 H g B U I G a y 8 8 y O G B U d O G o + Q C t n 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
2022-01-25 03:21:06 +00:00
buildInputs = [ docutils mock pytestCheckHook wheel ] ;
2020-04-24 23:36:52 +00:00
2022-01-13 20:06:32 +00:00
disabledTestPaths = [
# Requires network access
" t e s t s / i n t e g r a t i o n / t e s t _ c o p y . p y "
" t e s t s / i n t e g r a t i o n / t e s t _ d e l e t e . p y "
" t e s t s / i n t e g r a t i o n / t e s t _ d o w n l o a d . p y "
" t e s t s / i n t e g r a t i o n / t e s t _ p r o c e s s p o o l . p y "
" t e s t s / i n t e g r a t i o n / t e s t _ s 3 t r a n s f e r . p y "
" t e s t s / i n t e g r a t i o n / t e s t _ u p l o a d . p y "
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 ;
2022-01-13 20:06:32 +00:00
maintainers = with maintainers ; [ ] ;
2020-04-24 23:36:52 +00:00
} ;
}