From 5531b1ec05a4b206fa03ee8dff393e9d83472dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 24 Feb 2022 16:13:48 +0000 Subject: [PATCH] python3Packages.yowsup: fix build --- .../python-modules/yowsup/default.nix | 33 ++++++++++++++----- .../yowsup/dependency-fixes.patch | 13 -------- 2 files changed, 25 insertions(+), 21 deletions(-) delete mode 100644 pkgs/development/python-modules/yowsup/dependency-fixes.patch diff --git a/pkgs/development/python-modules/yowsup/default.nix b/pkgs/development/python-modules/yowsup/default.nix index 91c58192b8a2..30c056db9340 100644 --- a/pkgs/development/python-modules/yowsup/default.nix +++ b/pkgs/development/python-modules/yowsup/default.nix @@ -1,5 +1,13 @@ -{ buildPythonPackage, lib, fetchFromGitHub, six, python-axolotl, pytest -, isPy3k, consonance, appdirs +{ lib +, buildPythonPackage +, isPy3k +, fetchFromGitHub +, appdirs +, consonance +, protobuf +, python-axolotl +, six +, pytestCheckHook }: buildPythonPackage rec { @@ -17,19 +25,28 @@ buildPythonPackage rec { sha256 = "1pz0r1gif15lhzdsam8gg3jm6zsskiv2yiwlhaif5rl7lv3p0v7q"; }; - checkInputs = [ pytest ]; - checkPhase = '' - HOME=$(mktemp -d) py.test yowsup + postPatch = '' + substituteInPlace setup.py \ + --replace "argparse" "" \ + --replace "==" ">=" \ ''; - patches = [ ./dependency-fixes.patch ]; + checkInputs = [ + pytestCheckHook + ]; - propagatedBuildInputs = [ six python-axolotl consonance appdirs ]; + propagatedBuildInputs = [ + appdirs + consonance + protobuf + python-axolotl + six + ]; meta = with lib; { homepage = "https://github.com/tgalal/yowsup"; description = "The python WhatsApp library"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = with maintainers; [ SuperSandro2000 ]; }; } diff --git a/pkgs/development/python-modules/yowsup/dependency-fixes.patch b/pkgs/development/python-modules/yowsup/dependency-fixes.patch deleted file mode 100644 index eab56332d492..000000000000 --- a/pkgs/development/python-modules/yowsup/dependency-fixes.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index e3871a7..930bd6a 100755 ---- a/setup.py -+++ b/setup.py -@@ -5,7 +5,7 @@ import yowsup - import platform - import sys - --deps = ['consonance==0.1.2', 'argparse', 'python-axolotl==0.2.2', 'six==1.10', 'appdirs', 'protobuf>=3.6.0'] -+deps = ['consonance>=0.1', 'python-axolotl>=0.2', 'six>=1.10', 'appdirs', 'protobuf>=3.6.0'] - - if sys.version_info < (2, 7): - deps.append('importlib')