2024-06-05 15:53:02 +00:00
{
lib ,
stdenv ,
botocore ,
buildPythonPackage ,
fetchFromGitHub ,
pytestCheckHook ,
pythonOlder ,
setuptools ,
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " s 3 t r a n s f e r " ;
2024-05-15 15:35:15 +00:00
version = " 0 . 1 0 . 1 " ;
2024-02-29 20:09:43 +00:00
pyproject = true ;
2020-04-24 23:36:52 +00:00
2024-02-29 20:09:43 +00:00
disabled = pythonOlder " 3 . 8 " ;
2022-01-13 20:06:32 +00:00
src = fetchFromGitHub {
owner = " b o t o " ;
2024-02-29 20:09:43 +00:00
repo = " s 3 t r a n s f e r " ;
rev = " r e f s / t a g s / ${ version } " ;
2024-05-15 15:35:15 +00:00
hash = " s h a 2 5 6 - E H N k Y v i a f n u U 8 A A D p 9 o y a D u A n o P O d O V N S L C c o O N n H P Y = " ;
2020-04-24 23:36:52 +00:00
} ;
2024-06-05 15:53:02 +00:00
nativeBuildInputs = [ setuptools ] ;
2024-02-29 20:09:43 +00:00
2024-06-05 15:53:02 +00:00
propagatedBuildInputs = [ botocore ] ;
2020-04-24 23:36:52 +00:00
2024-06-05 15:53:02 +00:00
nativeCheckInputs = [ pytestCheckHook ] ;
2020-04-24 23:36:52 +00:00
2024-06-05 15:53:02 +00:00
disabledTestPaths =
[
# Requires network access
" t e s t s / i n t e g r a t i o n "
]
++
# 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
2024-06-05 15:53:02 +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 = {
2024-06-05 15:53:02 +00:00
crt = [ botocore . optional-dependencies . crt ] ;
2024-01-13 08:15:51 +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 " ;
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
} ;
}