2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
2021-08-22 07:53:02 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
2023-02-02 18:25:31 +00:00
|
|
|
, prettytable
|
2021-08-05 21:33:18 +00:00
|
|
|
, prompt-toolkit
|
2021-08-22 07:53:02 +00:00
|
|
|
, ptable
|
2020-04-24 23:36:52 +00:00
|
|
|
, pygments
|
2021-08-22 07:53:02 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2023-02-02 18:25:31 +00:00
|
|
|
, rich
|
2020-04-24 23:36:52 +00:00
|
|
|
, sphinx
|
|
|
|
, testtools
|
2021-08-22 07:53:02 +00:00
|
|
|
, tkinter
|
|
|
|
, urllib3
|
2022-07-14 12:49:19 +00:00
|
|
|
, zeep
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-08-22 07:53:02 +00:00
|
|
|
pname = "softlayer";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "6.1.3";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-22 07:53:02 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = "softlayer-python";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-msNW0PeDbs5iq77FBPKKWH0js/PAQz6xfbM0ycMVg5U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2023-02-02 18:25:31 +00:00
|
|
|
--replace "rich ==" "rich >="
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
2023-02-02 18:25:31 +00:00
|
|
|
prettytable
|
2021-08-22 07:53:02 +00:00
|
|
|
prompt-toolkit
|
|
|
|
ptable
|
|
|
|
pygments
|
|
|
|
requests
|
2022-07-14 12:49:19 +00:00
|
|
|
rich
|
2023-02-02 18:25:31 +00:00
|
|
|
urllib3
|
2021-08-22 07:53:02 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-22 07:53:02 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
sphinx
|
|
|
|
testtools
|
|
|
|
tkinter
|
2022-07-14 12:49:19 +00:00
|
|
|
zeep
|
|
|
|
];
|
|
|
|
|
|
|
|
# Otherwise soap_tests.py will fail to create directory
|
|
|
|
# Permission denied: '/homeless-shelter'
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Test fails with ConnectionError trying to connect to api.softlayer.com
|
2023-02-02 18:25:31 +00:00
|
|
|
"tests/transports/soap_tests.py.unstable"
|
2021-08-22 07:53:02 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"SoftLayer"
|
|
|
|
];
|
2021-08-22 07:53:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-08-22 07:53:02 +00:00
|
|
|
description = "Python libraries that assist in calling the SoftLayer API";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/softlayer/softlayer-python";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/softlayer/softlayer-python/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|