1{ 2 lib, 3 ascii-magic, 4 buildPythonPackage, 5 fetchFromGitHub, 6 oauthlib, 7 pillow, 8 pytest-cov-stub, 9 pytestCheckHook, 10 pythonOlder, 11 requests, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "weconnect"; 17 version = "0.60.8"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "tillsteinbach"; 24 repo = "WeConnect-python"; 25 tag = "v${version}"; 26 hash = "sha256-o8g409R+3lXlwPiDFi9eCzTwcDcZhMEMcc8a1YvlomM="; 27 }; 28 29 postPatch = '' 30 substituteInPlace weconnect/__version.py \ 31 --replace-fail "0.0.0dev" "${version}" 32 substituteInPlace setup.py \ 33 --replace-fail "setup_requires=SETUP_REQUIRED" "setup_requires=[]" \ 34 --replace-fail "tests_require=TEST_REQUIRED" "tests_require=[]" 35 substituteInPlace pytest.ini \ 36 --replace-fail "required_plugins = pytest-cov" "" 37 ''; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 oauthlib 43 requests 44 ]; 45 46 optional-dependencies = { 47 Images = [ 48 ascii-magic 49 pillow 50 ]; 51 }; 52 53 nativeCheckInputs = [ 54 pytest-cov-stub 55 pytestCheckHook 56 ]; 57 58 pythonImportsCheck = [ "weconnect" ]; 59 60 meta = with lib; { 61 description = "Python client for the Volkswagen WeConnect Services"; 62 homepage = "https://github.com/tillsteinbach/WeConnect-python"; 63 changelog = "https://github.com/tillsteinbach/WeConnect-python/releases/tag/v${version}"; 64 license = licenses.mit; 65 maintainers = with maintainers; [ fab ]; 66 }; 67}