Unverified Commit 953fd12c authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

python3Packages.weconnect: relax requests (#515801)

parents 8dbadba6 ce137c95
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
  weconnect,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "weconnect-mqtt";
  version = "0.49.5";
  pyproject = true;
@@ -18,13 +18,13 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "tillsteinbach";
    repo = "WeConnect-mqtt";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-69p7lAO7W+odrm1kLhvB8v4kNKx6IWBUSOQKgrxVCCY=";
  };

  postPatch = ''
    substituteInPlace weconnect_mqtt/__version.py \
      --replace-fail "0.0.0dev" "${version}"
      --replace-fail "0.0.0dev" "${finalAttrs.version}"
    substituteInPlace requirements.txt \
      --replace-fail "weconnect[Images]~=" "weconnect>="
    substituteInPlace pytest.ini \
@@ -52,9 +52,9 @@ buildPythonPackage rec {
  meta = {
    description = "Python client that publishes data from Volkswagen WeConnect";
    homepage = "https://github.com/tillsteinbach/WeConnect-mqtt";
    changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/${src.tag}";
    changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
    mainProgram = "weconnect-mqtt";
  };
}
})
+10 −7
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
  setuptools,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "weconnect";
  version = "0.60.11";
  pyproject = true;
@@ -20,13 +20,13 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "tillsteinbach";
    repo = "WeConnect-python";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-llAWCjhP/fwI+H8BRpMYxba8jC+WDc66xkUDwT3NHcA=";
  };

  postPatch = ''
    substituteInPlace weconnect/__version.py \
      --replace-fail "0.0.0dev" "${version}"
      --replace-fail "0.0.0dev" "${finalAttrs.version}"
    substituteInPlace setup.py \
      --replace-fail "setup_requires=SETUP_REQUIRED" "setup_requires=[]" \
      --replace-fail "tests_require=TEST_REQUIRED" "tests_require=[]"
@@ -34,6 +34,11 @@ buildPythonPackage rec {
      --replace-fail "required_plugins = pytest-cov" ""
  '';

  pythonRelaxDeps = [
    "oauthlib"
    "requests"
  ];

  build-system = [ setuptools ];

  dependencies = [
@@ -42,8 +47,6 @@ buildPythonPackage rec {
    requests
  ];

  pythonRelaxDeps = [ "oauthlib" ];

  optional-dependencies = {
    Images = [
      ascii-magic
@@ -61,8 +64,8 @@ buildPythonPackage rec {
  meta = {
    description = "Python client for the Volkswagen WeConnect Services";
    homepage = "https://github.com/tillsteinbach/WeConnect-python";
    changelog = "https://github.com/tillsteinbach/WeConnect-python/releases/tag/${src.tag}";
    changelog = "https://github.com/tillsteinbach/WeConnect-python/releases/tag/v${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}
})