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