1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 requests, 7 ruamel-yaml, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "osc-sdk-python"; 13 version = "0.36.0"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "outscale"; 18 repo = "osc-sdk-python"; 19 tag = "v${version}"; 20 hash = "sha256-PzTdQ5/ZtMAJ+niQNTlXCstjqhpuSCnRo0CybUfsz7s="; 21 fetchSubmodules = true; 22 }; 23 24 nativeBuildInputs = [ setuptools ]; 25 26 propagatedBuildInputs = [ 27 requests 28 ruamel-yaml 29 ]; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 postPatch = '' 34 substituteInPlace setup.py \ 35 --replace "ruamel.yaml==0.17.32" "ruamel.yaml" 36 ''; 37 38 # Only keep test not requiring access and secret keys 39 enabledTestPaths = [ "tests/test_net.py" ]; 40 41 pythonImportsCheck = [ "osc_sdk_python" ]; 42 43 meta = with lib; { 44 description = "SDK to perform actions on Outscale API"; 45 homepage = "https://github.com/outscale/osc-sdk-python"; 46 license = licenses.bsd3; 47 maintainers = [ ]; 48 }; 49}