1{ lib
2, aiohttp
3, beautifulsoup4
4, buildPythonPackage
5, cryptography
6, fetchFromGitHub
7, lxml
8, pyjwt
9, pythonOlder
10, setuptools-scm
11}:
12
13buildPythonPackage rec {
14 pname = "skodaconnect";
15 version = "1.1.26";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "lendy007";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-zuS19oM3V+o0yiby6yOX2RSxXY3m5qhqjlX2v9jmpIk=";
25 };
26
27 SETUPTOOLS_SCM_PRETEND_VERSION = version;
28
29 nativeBuildInputs = [
30 setuptools-scm
31 ];
32
33 propagatedBuildInputs = [
34 aiohttp
35 beautifulsoup4
36 cryptography
37 lxml
38 pyjwt
39 ];
40
41 postPatch = ''
42 substituteInPlace setup.py \
43 --replace "'pytest>=5,<6'," ""
44 substituteInPlace requirements.txt \
45 --replace "pytest-asyncio" ""
46 '';
47
48 # Project has no tests
49 doCheck = false;
50
51 pythonImportsCheck = [
52 "skodaconnect"
53 ];
54
55 meta = with lib; {
56 description = "Python module to communicate with Skoda Connect";
57 homepage = "https://github.com/lendy007/skodaconnect";
58 license = with licenses; [ asl20 ];
59 maintainers = with maintainers; [ fab ];
60 };
61}