summary refs log tree commit diff
path: root/pkgs/development/python-modules/yowsup
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-05-03 15:35:51 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2018-05-04 09:09:59 +0200
commitcf50edf58385c4ca261b53ad09c9be2d94349427 (patch)
tree84a001daa476fa8464e594d6b08d502b923928e0 /pkgs/development/python-modules/yowsup
parentae7c71e26706c0fa6653831456468447b417b868 (diff)
downloadnixpkgs-cf50edf58385c4ca261b53ad09c9be2d94349427.tar
nixpkgs-cf50edf58385c4ca261b53ad09c9be2d94349427.tar.gz
nixpkgs-cf50edf58385c4ca261b53ad09c9be2d94349427.tar.bz2
nixpkgs-cf50edf58385c4ca261b53ad09c9be2d94349427.tar.lz
nixpkgs-cf50edf58385c4ca261b53ad09c9be2d94349427.tar.xz
nixpkgs-cf50edf58385c4ca261b53ad09c9be2d94349427.tar.zst
nixpkgs-cf50edf58385c4ca261b53ad09c9be2d94349427.zip
python3Packages.yowsup: 2.5.2 -> 2.5.7
The latest update of `yowsup` (https://github.com/tgalal/yowsup/releases/tag/v2.5.7)
contains the following fixes:

* Updated tokens
* Fixed tgalal/yowsup#1842: Bug in protocol_groups RemoveGroupsNotificationProtocolEntity
* Other minor bug fixes

The `argparse-dependency.patch` required a rebase onto the latest
version of `setup.py` and ensures that `argparse` won't be needed as
extra dependency as our `python3` package ships `argparse` by default.

A short note to Python 2 support:

the actual issue related to Python 2.x support has been resolved
(https://github.com/tgalal/yowsup/issues/2325#issuecomment-354533727),
however this relies on `six==1.10` which isn't support by `nixpkgs` as
`six` has been bumped to `1.11`. When trying to inject a patched version
of our `six` package based on `six==1.10` you'll run into issues with
duplicated libraries in your closure as further build dependencies
(`pytest` in this case) use the latest `six` version. As Python 2.7 will
die in 2020 (https://pythonclock.org/) and patching around in the
dependencies of `pytest` to get `yowsup` running isn't worth the effort
in my opinion I decided to keep the Python 2.x build disabled for now.
Diffstat (limited to 'pkgs/development/python-modules/yowsup')
-rw-r--r--pkgs/development/python-modules/yowsup/argparse-dependency.patch6
-rw-r--r--pkgs/development/python-modules/yowsup/default.nix9
2 files changed, 7 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/yowsup/argparse-dependency.patch b/pkgs/development/python-modules/yowsup/argparse-dependency.patch
index 364f0054fe7..e2b9f0c9a74 100644
--- a/pkgs/development/python-modules/yowsup/argparse-dependency.patch
+++ b/pkgs/development/python-modules/yowsup/argparse-dependency.patch
@@ -1,13 +1,13 @@
 diff --git a/setup.py b/setup.py
-index 053ed07..60f0d9a 100755
+index 991e89c..7a96ccf 100755
 --- a/setup.py
 +++ b/setup.py
 @@ -5,7 +5,7 @@ import yowsup
  import platform
  import sys
  
--deps = ['python-dateutil', 'argparse', 'python-axolotl>=0.1.39', 'six']
+-deps = ['python-dateutil', 'argparse', 'python-axolotl>=0.1.39', 'six==1.10']
 +deps = ['python-dateutil', 'python-axolotl>=0.1.39', 'six']
  
  if sys.version_info < (2,7):
-     deps += ['importlib']
+     deps += ['importlib', "protobuf==3.4.0"]
diff --git a/pkgs/development/python-modules/yowsup/default.nix b/pkgs/development/python-modules/yowsup/default.nix
index f7ee986aebb..5fa4af18c08 100644
--- a/pkgs/development/python-modules/yowsup/default.nix
+++ b/pkgs/development/python-modules/yowsup/default.nix
@@ -3,19 +3,18 @@
 }:
 
 buildPythonPackage rec {
-  name = "${pname}-${version}";
   pname = "yowsup";
-  version = "2.5.2";
+  version = "2.5.7";
 
-  # python2 is currently incompatible with yowsup:
-  # https://github.com/tgalal/yowsup/issues/2325#issuecomment-343516519
+  # The Python 2.x support of this package is incompatible with `six==1.11`:
+  # https://github.com/tgalal/yowsup/issues/2416#issuecomment-365113486
   disabled = !isPy3k;
 
   src = fetchFromGitHub {
     owner = "tgalal";
     repo = "yowsup";
     rev = "v${version}";
-    sha256 = "16l8jmr32wwvl11m0a4r4id3dkfqj2n7dn6gky1077xwmj2da4fl";
+    sha256 = "1p0hdj5x38v2cxjnhdnqcnp5g7la57mbi365m0z83wa01x2n73w6";
   };
 
   checkInputs = [ pytest ];