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 " ;
2024-01-13 08:15:51 +00:00
version = " 0 . 8 . 2 " ;
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
2023-11-16 04:20:00 +00:00
disabled = pythonOlder " 3 . 7 " ;
2022-01-13 20:06:32 +00:00
src = fetchFromGitHub {
owner = " b o t o " ;
repo = pname ;
rev = version ;
2024-01-13 08:15:51 +00:00
hash = " s h a 2 5 6 - s d o P j k Z H N 5 w V C K 9 V 6 V + f k G v Q v E Q o 2 A B y 2 l q e f E K f g 6 o = " ;
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
2024-01-13 08:15:51 +00:00
passthru . optional-dependencies = {
crt = [ botocore . optional-dependencies . crt ] ;
} ;
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 " ;
2023-11-16 04:20:00 +00:00
changelog = " 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 / b l o b / ${ version } / C H A N G E L O G . r s t " ;
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
} ;
}