2021-12-19 01:06:50 +00:00
|
|
|
{ lib
|
|
|
|
, ascii-magic
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pillow
|
|
|
|
, pytest-httpserver
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2022-02-20 05:27:41 +00:00
|
|
|
, oauthlib
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "weconnect";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "0.47.1";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tillsteinbach";
|
|
|
|
repo = "WeConnect-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
hash = "sha256-qxE8hX6HBmP6s+NivwSgbrPWzUDr8RW9HAyQ21WTiZE=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ascii-magic
|
2022-02-20 05:27:41 +00:00
|
|
|
oauthlib
|
2021-12-19 01:06:50 +00:00
|
|
|
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-04-15 01:41:22 +00:00
|
|
|
substituteInPlace image_extra_requirements.txt \
|
2022-07-18 16:21:45 +00:00
|
|
|
--replace "pillow~=9.2.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 ];
|
|
|
|
};
|
|
|
|
}
|