depot/third_party/nixpkgs/pkgs/development/python-modules/pycarwings2/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

60 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, pyyaml
, iso8601
, requests
, pycryptodome
}:
buildPythonPackage rec {
pname = "pycarwings2";
version = "2.14";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "filcole";
repo = pname;
rev = "v${version}";
sha256 = "sha256-kqj/NZXqgPUsOnnzMPmIlICHek7RBxksmL3reNBK+bo=";
};
propagatedBuildInputs = [
pyyaml
iso8601
requests
pycryptodome
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
substituteInPlace setup.cfg \
--replace " --flake8 --cov=pycarwings2 --cache-clear --ignore=venv --verbose" ""
'';
disabledTests = [
# Test requires network access
"test_bad_password"
];
pythonImportsCheck = [
"pycarwings2"
];
meta = with lib; {
description = "Python library for interacting with the NissanConnect EV";
homepage = "https://github.com/filcole/pycarwings2";
changelog = "https://github.com/filcole/pycarwings2/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}