evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / weconnect-mqtt / default.nix
bloba3380e20b5538f3b05a9c452b6687c9d3cc0fb5e
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   paho-mqtt,
6   pytestCheckHook,
7   python-dateutil,
8   pythonOlder,
9   setuptools,
10   weconnect,
13 buildPythonPackage rec {
14   pname = "weconnect-mqtt";
15   version = "0.49.2";
16   pyproject = true;
18   disabled = pythonOlder "3.8";
20   src = fetchFromGitHub {
21     owner = "tillsteinbach";
22     repo = "WeConnect-mqtt";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-jTScDPTj7aIQcGuL2g8MvuYln6iaj6abEyCfd8vvT2I=";
25   };
27   postPatch = ''
28     substituteInPlace weconnect_mqtt/__version.py \
29       --replace-fail "0.0.0dev" "${version}"
30     substituteInPlace requirements.txt \
31       --replace-fail "weconnect[Images]~=" "weconnect>="
32     substituteInPlace pytest.ini \
33       --replace-fail "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \
34       --replace-fail "pytest-cov" ""
35   '';
37   pythonRelaxDeps = [ "python-dateutil" ];
39   build-system = [ setuptools ];
42   dependencies = [
43     paho-mqtt
44     python-dateutil
45     weconnect
46   ] ++ weconnect.optional-dependencies.Images;
48   nativeCheckInputs = [ pytestCheckHook ];
50   pythonImportsCheck = [ "weconnect_mqtt" ];
52   meta = with lib; {
53     description = "Python client that publishes data from Volkswagen WeConnect";
54     homepage = "https://github.com/tillsteinbach/WeConnect-mqtt";
55     changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${version}";
56     license = with licenses; [ mit ];
57     maintainers = with maintainers; [ fab ];
58     mainProgram = "weconnect-mqtt";
59   };