2021-12-19 01:06:50 +00:00
|
|
|
{ lib
|
|
|
|
, ascii-magic
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pillow
|
|
|
|
, pytest-httpserver
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "weconnect";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.35.0";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tillsteinbach";
|
|
|
|
repo = "WeConnect-python";
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-Rx9OTx3GNIIRo7jIDIp8i6vGUFwn1keg5ifXqzewr4I=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ascii-magic
|
|
|
|
pillow
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-httpserver
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace weconnect/__version.py \
|
|
|
|
--replace "develop" "${version}"
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "setup_requires=SETUP_REQUIRED," "setup_requires=[]," \
|
|
|
|
--replace "tests_require=TEST_REQUIRED," "tests_require=[],"
|
2022-02-10 20:34:41 +00:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "pillow~=9.0.0" "pillow"
|
2021-12-19 01:06:50 +00:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov=weconnect --cov-config=.coveragerc --cov-report html" "" \
|
|
|
|
--replace "pytest-cov" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"weconnect"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for the Volkswagen WeConnect Services";
|
|
|
|
homepage = "https://github.com/tillsteinbach/WeConnect-python";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|