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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.59.5";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tillsteinbach";
|
|
|
|
repo = "WeConnect-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-ujIA98QD8ds2/iLLeJqn88nY9tZuuOSnOwGvRznA8PQ=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
oauthlib
|
2021-12-19 01:06:50 +00:00
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
Images = [
|
|
|
|
ascii-magic
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-19 01:06:50 +00:00
|
|
|
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 \
|
2023-03-04 12:14:45 +00:00
|
|
|
--replace "pillow~=" "pillow>=" \
|
|
|
|
--replace "ascii_magic~=" "ascii_magic>="
|
2021-12-19 01:06:50 +00:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov=weconnect --cov-config=.coveragerc --cov-report html" "" \
|
2023-11-16 04:20:00 +00:00
|
|
|
--replace "required_plugins = pytest-httpserver pytest-cov" ""
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"weconnect"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for the Volkswagen WeConnect Services";
|
|
|
|
homepage = "https://github.com/tillsteinbach/WeConnect-python";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/tillsteinbach/WeConnect-python/releases/tag/v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|