summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/base58/default.nix25
-rw-r--r--pkgs/development/python-modules/block-io/default.nix30
-rw-r--r--pkgs/development/python-modules/cheroot/default.nix2
-rw-r--r--pkgs/development/python-modules/click-completion/default.nix23
-rw-r--r--pkgs/development/python-modules/click-didyoumean/default.nix22
-rw-r--r--pkgs/development/python-modules/elasticsearch-dsl/default.nix39
-rw-r--r--pkgs/development/python-modules/flask-assets/default.nix4
-rw-r--r--pkgs/development/python-modules/grpcio/default.nix4
-rw-r--r--pkgs/development/python-modules/gst-python/default.nix4
-rw-r--r--pkgs/development/python-modules/ldappool/default.nix4
-rw-r--r--pkgs/development/python-modules/py3exiv2/default.nix9
-rw-r--r--pkgs/development/python-modules/py3exiv2/setup.patch2
-rw-r--r--pkgs/development/python-modules/pyftgl/default.nix18
-rw-r--r--pkgs/development/python-modules/pyjet/default.nix21
-rw-r--r--pkgs/development/python-modules/pyocr/default.nix46
-rw-r--r--pkgs/development/python-modules/pyocr/paths.patch57
-rw-r--r--pkgs/development/python-modules/pypillowfight/default.nix38
-rw-r--r--pkgs/development/python-modules/pysam/default.nix4
-rw-r--r--pkgs/development/python-modules/sharedmem/default.nix21
-rw-r--r--pkgs/development/python-modules/shellingham/default.nix19
20 files changed, 320 insertions, 72 deletions
diff --git a/pkgs/development/python-modules/base58/default.nix b/pkgs/development/python-modules/base58/default.nix
new file mode 100644
index 00000000000..43b2761f6bc
--- /dev/null
+++ b/pkgs/development/python-modules/base58/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, buildPythonPackage, pytest, pyhamcrest }:
+
+buildPythonPackage rec {
+  pname = "base58";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "keis";
+    repo = "base58";
+    rev = "v${version}";
+    sha256 = "0f8isdpvbgw0sqn9bj7hk47y8akpvdl8sn6rkszla0xb92ywj0f6";
+  };
+
+  buildInputs = [ pytest pyhamcrest ];
+  checkPhase = ''
+    pytest
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Base58 and Base58Check implementation";
+    homepage = https://github.com/keis/base58;
+    license = licenses.mit;
+    maintainers = with maintainers; [ nyanloutre ];
+  };
+}
diff --git a/pkgs/development/python-modules/block-io/default.nix b/pkgs/development/python-modules/block-io/default.nix
new file mode 100644
index 00000000000..c0df26143ec
--- /dev/null
+++ b/pkgs/development/python-modules/block-io/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchPypi, fetchpatch, buildPythonPackage, base58, ecdsa, pycryptodome, requests, six }:
+
+buildPythonPackage rec {
+  pname = "block-io";
+  version = "1.1.8";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "15468pvpcp41ly7kjpmikpyi4av57d9zhf5j1v01j78r1xqqk56g";
+  };
+
+  propagatedBuildInputs = [
+    base58
+    ecdsa
+    pycryptodome
+    requests
+    six
+  ];
+
+  # Tests needs a BlockIO API key to run properly
+  # https://github.com/BlockIo/block_io-python/blob/79006bc8974544b70a2d8e9f19c759941d32648e/test.py#L18
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Integrate Bitcoin, Dogecoin and Litecoin in your Python applications using block.io";
+    homepage = https://github.com/BlockIo/block_io-python;
+    license = licenses.mit;
+    maintainers = with maintainers; [ nyanloutre ];
+  };
+}
diff --git a/pkgs/development/python-modules/cheroot/default.nix b/pkgs/development/python-modules/cheroot/default.nix
index 6edad2d0161..08a455eb40c 100644
--- a/pkgs/development/python-modules/cheroot/default.nix
+++ b/pkgs/development/python-modules/cheroot/default.nix
@@ -15,7 +15,7 @@ buildPythonPackage rec {
 
   patches = fetchpatch {
     name = "cheroot-fix-setup-python3.patch";
-    url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/cheroot-fix-setup-python3.patch?h=packages/python-cheroot";
+    url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/cheroot-fix-setup-python3.patch?h=packages/python-cheroot&id=9b33cb0885b3c0d91adeacae23761a4321eb0e64";
     sha256 = "1rlgz0qln536y00mfqlf0i9hz3f53id73wh47cg5q2vcsw1w2bpc";
   };
 
diff --git a/pkgs/development/python-modules/click-completion/default.nix b/pkgs/development/python-modules/click-completion/default.nix
new file mode 100644
index 00000000000..a6b36232531
--- /dev/null
+++ b/pkgs/development/python-modules/click-completion/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, buildPythonPackage, fetchPypi, isPy3k,
+  click, jinja2, shellingham, six
+}:
+
+buildPythonPackage rec {
+  pname = "click-completion";
+  version = "0.4.1";
+  disabled = (!isPy3k);
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1fjm22dyma26jrx4ki2z4dwbhcah4r848fz381x64sz5xxq3xdrk";
+  };
+
+  propagatedBuildInputs = [ click jinja2 shellingham six ];
+
+  meta = with stdenv.lib; {
+    description = "Add or enhance bash, fish, zsh and powershell completion in Click";
+    homepage = https://github.com/click-contrib/click-completion;
+    license = licenses.mit;
+    maintainers = with maintainers; [ mbode ];
+  };
+}
diff --git a/pkgs/development/python-modules/click-didyoumean/default.nix b/pkgs/development/python-modules/click-didyoumean/default.nix
new file mode 100644
index 00000000000..4cd2ea15029
--- /dev/null
+++ b/pkgs/development/python-modules/click-didyoumean/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonPackage, fetchPypi,
+  click
+}:
+
+buildPythonPackage rec {
+  pname = "click-didyoumean";
+  version = "0.0.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1svaza5lpvdbmyrx5xi0riqzq4hb9wnlpqrg6r8zy14pbi42j8hi";
+  };
+
+  propagatedBuildInputs = [ click ];
+
+  meta = with stdenv.lib; {
+    description = "Enable git-like did-you-mean feature in click";
+    homepage = https://github.com/click-contrib/click-didyoumean;
+    license = licenses.mit;
+    maintainers = with maintainers; [ mbode ];
+  };
+}
diff --git a/pkgs/development/python-modules/elasticsearch-dsl/default.nix b/pkgs/development/python-modules/elasticsearch-dsl/default.nix
new file mode 100644
index 00000000000..94d47073764
--- /dev/null
+++ b/pkgs/development/python-modules/elasticsearch-dsl/default.nix
@@ -0,0 +1,39 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, isPy3k
+, elasticsearch
+, ipaddress
+, python-dateutil
+, pytz
+, six
+}:
+
+buildPythonPackage rec {
+  pname = "elasticsearch-dsl";
+  version = "6.2.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0f0w23kzyym0fkzisdkcl4xpnm8fsi97v1kskyvfrhj3mxy179fh";
+  };
+
+  propagatedBuildInputs = [ elasticsearch python-dateutil six ]
+                          ++ stdenv.lib.optional (!isPy3k) ipaddress;
+
+  # ImportError: No module named test_elasticsearch_dsl
+  # Tests require a local instance of elasticsearch
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "High level Python client for Elasticsearch";
+    longDescription = ''
+      Elasticsearch DSL is a high-level library whose aim is to help with
+      writing and running queries against Elasticsearch. It is built on top of
+      the official low-level client (elasticsearch-py).
+    '';
+    homepage = https://github.com/elasticsearch/elasticsearch-dsl-py;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ desiderius ];
+  };
+}
diff --git a/pkgs/development/python-modules/flask-assets/default.nix b/pkgs/development/python-modules/flask-assets/default.nix
index 7f3b6367b6e..a8e454f4a2c 100644
--- a/pkgs/development/python-modules/flask-assets/default.nix
+++ b/pkgs/development/python-modules/flask-assets/default.nix
@@ -9,6 +9,10 @@ buildPythonPackage rec {
     sha256 = "0ivqsihk994rxw58vdgzrx4d77d7lpzjm4qxb38hjdgvi5xm4cb0";
   };
 
+  patchPhase = ''
+    substituteInPlace tests/test_integration.py --replace 'static_path=' 'static_url_path='
+  '';
+
   propagatedBuildInputs = [ flask webassets flask_script nose ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix
index 3d3824cdabe..6141e4a389c 100644
--- a/pkgs/development/python-modules/grpcio/default.nix
+++ b/pkgs/development/python-modules/grpcio/default.nix
@@ -4,11 +4,11 @@
 with stdenv.lib;
 buildPythonPackage rec {
   pname = "grpcio";
-  version = "1.14.1";
+  version = "1.15.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4bf23666e763ca7ff6010465864e9f088f4ac7ecc1e11abd6f85b250e66b2c05";
+    sha256 = "1lhh76kgyibgsk6c54nbzzhkskknkbvn71xvixsk0prfp8izr98m";
   };
 
   nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin darwin.cctools;
diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix
index bc855b5bc1c..49f44bb16e4 100644
--- a/pkgs/development/python-modules/gst-python/default.nix
+++ b/pkgs/development/python-modules/gst-python/default.nix
@@ -4,7 +4,7 @@
 
 let
   pname = "gst-python";
-  version = "1.14.0";
+  version = "1.14.2";
   name = "${pname}-${version}";
 in buildPythonPackage rec {
   inherit pname version;
@@ -15,7 +15,7 @@ in buildPythonPackage rec {
       "${meta.homepage}/src/gst-python/${name}.tar.xz"
       "mirror://gentoo/distfiles/${name}.tar.xz"
       ];
-    sha256 = "1rlr6gl4lg97ng4jxh3gb2ldmywm15vwsa72nvggr8qa2l8q3fg0";
+    sha256 = "08nb011acyvlz48fqh8c084k0dlssz9b7wha7zzk797inidbwh6w";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/python-modules/ldappool/default.nix b/pkgs/development/python-modules/ldappool/default.nix
index a09fa75ce34..02d10b832ff 100644
--- a/pkgs/development/python-modules/ldappool/default.nix
+++ b/pkgs/development/python-modules/ldappool/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   name = "ldappool-${version}";
-  version = "2.3.0";
+  version = "2.2.0";
 
   src = fetchPypi {
     pname = "ldappool";
     inherit version;
-    sha256 = "899d38e891372981166350c813ff5ce2ad8ac383311edccda8102362c1d60952";
+    sha256 = "1akmzf51cjfvmd0nvvm562z1w9vq45zsx6fa72kraqgsgxhnrhqz";
   };
 
   nativeBuildInputs = [ pbr ];
diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix
index d8633488102..4c6ca0bad33 100644
--- a/pkgs/development/python-modules/py3exiv2/default.nix
+++ b/pkgs/development/python-modules/py3exiv2/default.nix
@@ -1,4 +1,4 @@
-{ buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx }:
+{ buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx, substituteAll, python }:
 
 buildPythonPackage rec {
   pname = "py3exiv2";
@@ -16,7 +16,12 @@ buildPythonPackage rec {
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
 
   # fix broken libboost_python3 detection
-  patches = [ ./setup.patch ];
+  patches = [
+    (substituteAll {
+      src = ./setup.patch;
+      version = "3${stdenv.lib.versions.minor python.version}";
+    })
+  ];
 
   meta = {
     homepage = "https://launchpad.net/py3exiv2";
diff --git a/pkgs/development/python-modules/py3exiv2/setup.patch b/pkgs/development/python-modules/py3exiv2/setup.patch
index bb4b1152347..8b0619c5bc5 100644
--- a/pkgs/development/python-modules/py3exiv2/setup.patch
+++ b/pkgs/development/python-modules/py3exiv2/setup.patch
@@ -5,7 +5,7 @@
                      return l.replace('libboost', 'boost')
  
 -libboost = get_libboost_name()
-+libboost = 'boost_python3'
++libboost = 'boost_python@version@'
  
  setup(
      name='py3exiv2',
diff --git a/pkgs/development/python-modules/pyftgl/default.nix b/pkgs/development/python-modules/pyftgl/default.nix
index a8583747225..1163f007b09 100644
--- a/pkgs/development/python-modules/pyftgl/default.nix
+++ b/pkgs/development/python-modules/pyftgl/default.nix
@@ -1,5 +1,13 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub, isPy3k
-, boost, freetype, ftgl, libGLU_combined }:
+{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
+, boost, freetype, ftgl, libGLU_combined
+, python
+}:
+
+let
+
+  pythonVersion = with lib.versions; "${major python.version}${minor python.version}";
+
+in
 
 buildPythonPackage rec {
   pname = "pyftgl";
@@ -13,13 +21,13 @@ buildPythonPackage rec {
     sha256 = "12zcjv4cwwjihiaf74kslrdmmk4bs47h7006gyqfwdfchfjdgg4r";
   };
 
-  postPatch = stdenv.lib.optional isPy3k ''
-    sed -i "s,'boost_python','boost_python3',g" setup.py
+  postPatch = ''
+    sed -i "s,'boost_python','boost_python${pythonVersion}',g" setup.py
   '';
 
   buildInputs = [ boost freetype ftgl libGLU_combined ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Python bindings for FTGL (FreeType for OpenGL)";
     license = licenses.gpl2Plus;
   };
diff --git a/pkgs/development/python-modules/pyjet/default.nix b/pkgs/development/python-modules/pyjet/default.nix
new file mode 100644
index 00000000000..69d20863a77
--- /dev/null
+++ b/pkgs/development/python-modules/pyjet/default.nix
@@ -0,0 +1,21 @@
+{ lib, buildPythonPackage, fetchPypi, nose, numpy }:
+
+buildPythonPackage rec {
+  pname = "pyjet";
+  version = "1.3.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1glcwv9ni8i40smfw6m456xjadlkackim5nk33xmas1fa96lpagg";
+  };
+
+  propagatedBuildInputs = [ numpy ];
+  checkInputs = [ nose ];
+
+  meta = with lib; {
+    homepage = "https://github.com/scikit-hep/pyjet";
+    description = "The interface between FastJet and NumPy";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/pkgs/development/python-modules/pyocr/default.nix b/pkgs/development/python-modules/pyocr/default.nix
index c30d80a0015..47a73c9c80a 100644
--- a/pkgs/development/python-modules/pyocr/default.nix
+++ b/pkgs/development/python-modules/pyocr/default.nix
@@ -1,47 +1,39 @@
-{ lib, fetchFromGitHub, buildPythonPackage, pillow, six
-, tesseract, cuneiform, isPy3k
+{ lib, fetchFromGitLab, buildPythonPackage, pillow, six
+, tesseract, cuneiform, isPy3k, substituteAll, pytest, tox
 }:
 
 buildPythonPackage rec {
   pname = "pyocr";
-  version = "0.4.7";
+  version = "0.5.3";
   name = pname + "-" + version;
   disabled = !isPy3k;
 
   # Don't fetch from PYPI because it doesn't contain tests.
-  src = fetchFromGitHub {
-    owner = "jflesch";
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    group = "World";
+    owner = "OpenPaperwork";
     repo = "pyocr";
     rev = version;
-    sha256 = "1iw73r8yrgjf8g00yzpz62ymqbf89cqhyhl9g430srmsrq7mn2yd";
+    sha256 = "1nihf0qmbpg3yj3yp11jp6hp5z5dqf39nz6j9lqbvgi1nqbs7x15";
   };
 
-  NIX_CUNEIFORM_CMD = "${cuneiform}/bin/cuneiform";
-  NIX_CUNEIFORM_DATA = "${cuneiform}/share/cuneiform";
-  NIX_LIBTESSERACT_PATH = "${tesseract}/lib/libtesseract.so";
-  NIX_TESSDATA_PREFIX = "${tesseract}/share/tessdata";
-  NIX_TESSERACT_CMD = "${tesseract}/bin/tesseract";
-
-  patches = [ ./paths.patch ];
+  patches = [ (substituteAll {
+    src = ./paths.patch;
+    inherit cuneiform tesseract;
+  })
+  ];
 
   postPatch = ''
-    substituteInPlace src/pyocr/cuneiform.py \
-      --subst-var NIX_CUNEIFORM_CMD \
-      --subst-var NIX_CUNEIFORM_CMD
-
-    substituteInPlace src/pyocr/tesseract.py \
-      --subst-var NIX_TESSERACT_CMD
-
-    substituteInPlace src/pyocr/libtesseract/tesseract_raw.py \
-      --subst-var NIX_TESSDATA_PREFIX \
-      --subst-var NIX_LIBTESSERACT_PATH
+    echo 'version = "${version}"' > src/pyocr/_version.py
 
     # Disable specific tests that are probably failing because of this issue:
     # https://github.com/jflesch/pyocr/issues/52
     for test in $disabledTests; do
       file="''${test%%:*}"
       fun="''${test#*:}"
-      echo "$fun = unittest.skip($fun)" >> "tests/tests_$file.py"
+      echo "import pytest" >> "tests/tests_$file.py"
+      echo "$fun = pytest.mark.skip($fun)" >> "tests/tests_$file.py"
     done
   '';
 
@@ -57,14 +49,18 @@ buildPythonPackage rec {
     "libtesseract:TestLineBox.test_japanese"
     "libtesseract:TestTxt.test_japanese"
     "libtesseract:TestWordBox.test_japanese"
+    "libtesseract:TestTxt.test_multi"
+    "tesseract:TestTxt.test_multi"
     "tesseract:TestDigitLineBox.test_digits"
     "tesseract:TestTxt.test_japanese"
   ];
 
   propagatedBuildInputs = [ pillow six ];
+  checkInputs = [ pytest tox ];
+  checkPhase = "pytest";
 
   meta = {
-    homepage = "https://github.com/jflesch/pyocr";
+    inherit (src.meta) homepage;
     description = "A Python wrapper for Tesseract and Cuneiform";
     license = lib.licenses.gpl3Plus;
   };
diff --git a/pkgs/development/python-modules/pyocr/paths.patch b/pkgs/development/python-modules/pyocr/paths.patch
index 3fe11598b7d..9350d4050da 100644
--- a/pkgs/development/python-modules/pyocr/paths.patch
+++ b/pkgs/development/python-modules/pyocr/paths.patch
@@ -1,28 +1,28 @@
-diff --git a/src/pyocr/cuneiform.py b/src/pyocr/cuneiform.py
-index a461d92..1f2b914 100644
---- a/src/pyocr/cuneiform.py
-+++ b/src/pyocr/cuneiform.py
+Index: current/src/pyocr/cuneiform.py
+===================================================================
+--- current.orig/src/pyocr/cuneiform.py
++++ current/src/pyocr/cuneiform.py
 @@ -27,13 +27,9 @@ from . import error
  from . import util
  
  
 -# CHANGE THIS IF CUNEIFORM IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY
 -CUNEIFORM_CMD = 'cuneiform'
-+CUNEIFORM_CMD = '@NIX_CUNEIFORM_CMD@'
++CUNEIFORM_CMD = '@cuneiform@/bin/cuneiform'
  
 -CUNEIFORM_DATA_POSSIBLE_PATHS = [
 -    "/usr/local/share/cuneiform",
 -    "/usr/share/cuneiform",
 -]
-+CUNEIFORM_DATA_POSSIBLE_PATHS = ['@NIX_CUNEIFORM_DATA@']
++CUNEIFORM_DATA_POSSIBLE_PATHS = ['@cuneiform@/share/cuneiform']
  
  LANGUAGES_LINE_PREFIX = "Supported languages: "
  LANGUAGES_SPLIT_RE = re.compile("[^a-z]")
-diff --git a/src/pyocr/libtesseract/tesseract_raw.py b/src/pyocr/libtesseract/tesseract_raw.py
-index b4e7bda..47505f7 100644
---- a/src/pyocr/libtesseract/tesseract_raw.py
-+++ b/src/pyocr/libtesseract/tesseract_raw.py
-@@ -1,55 +1,13 @@
+Index: current/src/pyocr/libtesseract/tesseract_raw.py
+===================================================================
+--- current.orig/src/pyocr/libtesseract/tesseract_raw.py
++++ current/src/pyocr/libtesseract/tesseract_raw.py
+@@ -1,52 +1,13 @@
  import ctypes
  import logging
  import os
@@ -56,7 +56,13 @@ index b4e7bda..47505f7 100644
 -        # Jflesch> Don't they have the equivalent of LD_LIBRARY_PATH on
 -        # Windows ?
 -        "../vs2010/DLL_Release/libtesseract302.dll",
+-        # prefer the most recent first
+-        "libtesseract305.dll",
+-        "libtesseract304.dll",
+-        "libtesseract303.dll",
 -        "libtesseract302.dll",
+-        "libtesseract400.dll",  # Tesseract 4 is still in alpha stage
+-        "libtesseract.dll",
 -        "C:\\Program Files (x86)\\Tesseract-OCR\\libtesseract-4.dll",
 -        "C:\\Program Files (x86)\\Tesseract-OCR\\libtesseract-3.dll",
 -    ]
@@ -66,27 +72,18 @@ index b4e7bda..47505f7 100644
 -        "libtesseract.so.3",
 -    ]
 -
--
--g_libtesseract = None
--
--for libname in libnames:
--    try:
--        g_libtesseract = ctypes.cdll.LoadLibrary(libname)
--        break
--    except OSError:
--        pass
-+g_libtesseract = ctypes.cdll.LoadLibrary('@NIX_LIBTESSERACT_PATH@')
++libnames = [ "@tesseract@/lib/libtesseract.so" ]
  
+ g_libtesseract = None
  
- class PageSegMode(object):
-@@ -326,12 +284,11 @@ def init(lang=None):
+@@ -346,12 +307,11 @@ def init(lang=None):
      try:
          if lang:
              lang = lang.encode("utf-8")
 -        prefix = None
 -        if TESSDATA_PREFIX:
 -            prefix = TESSDATA_PREFIX.encode("utf-8")
-+        prefix = os.getenv('TESSDATA_PREFIX', '@NIX_TESSDATA_PREFIX@')
++        prefix = os.getenv('TESSDATA_PREFIX', '@tesseract@/share/tessdata')
 +        os.environ['TESSDATA_PREFIX'] = prefix
          g_libtesseract.TessBaseAPIInit3(
              ctypes.c_void_p(handle),
@@ -95,17 +92,17 @@ index b4e7bda..47505f7 100644
              ctypes.c_char_p(lang)
          )
          g_libtesseract.TessBaseAPISetVariable(
-diff --git a/src/pyocr/tesseract.py b/src/pyocr/tesseract.py
-index c935881..7139ffe 100755
---- a/src/pyocr/tesseract.py
-+++ b/src/pyocr/tesseract.py
-@@ -31,8 +31,7 @@ from .builders import DigitBuilder  # backward compatibility
+Index: current/src/pyocr/tesseract.py
+===================================================================
+--- current.orig/src/pyocr/tesseract.py
++++ current/src/pyocr/tesseract.py
+@@ -31,8 +31,7 @@ from .builders import DigitBuilder  # ba
  from .error import TesseractError  # backward compatibility
  from .util import digits_only
  
 -# CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY
 -TESSERACT_CMD = 'tesseract.exe' if os.name == 'nt' else 'tesseract'
-+TESSERACT_CMD = '@NIX_TESSERACT_CMD@'
++TESSERACT_CMD = '@tesseract@/bin/tesseract'
  
  TESSDATA_EXTENSION = ".traineddata"
  
diff --git a/pkgs/development/python-modules/pypillowfight/default.nix b/pkgs/development/python-modules/pypillowfight/default.nix
new file mode 100644
index 00000000000..76503122a1b
--- /dev/null
+++ b/pkgs/development/python-modules/pypillowfight/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, buildPythonPackage, fetchFromGitLab, nose, pillow
+, isPy3k, isPyPy
+}:
+buildPythonPackage rec {
+  name = "pypillowfight-${version}";
+  version = "0.2.4";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    group = "World";
+    owner = "OpenPaperwork";
+    repo = "libpillowfight";
+    rev = version;
+    sha256 = "0wbzfhbzim61fmkm7p7f2rwslacla1x00a6xp50haawjh9zfwc4y";
+  };
+
+  prePatch = ''
+    echo '#define INTERNAL_PILLOWFIGHT_VERSION "${version}"' > src/pillowfight/_version.h
+  '';
+
+  # Disable tests because they're designed to only work on Debian:
+  # https://github.com/jflesch/libpillowfight/issues/2#issuecomment-268259174
+  doCheck = false;
+
+  # Python 2.x is not supported, see:
+  # https://github.com/jflesch/libpillowfight/issues/1
+  disabled = !isPy3k && !isPyPy;
+
+  # This is needed by setup.py regardless of whether tests are enabled.
+  buildInputs = [ nose ];
+  propagatedBuildInputs = [ pillow ];
+
+  meta = with stdenv.lib; {
+    description = "Library containing various image processing algorithms";
+    inherit (src.meta) homepage;
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/development/python-modules/pysam/default.nix b/pkgs/development/python-modules/pysam/default.nix
index 9d6cbacc958..3138c114e69 100644
--- a/pkgs/development/python-modules/pysam/default.nix
+++ b/pkgs/development/python-modules/pysam/default.nix
@@ -14,7 +14,7 @@
 
 buildPythonPackage rec {
   pname   = "pysam";
-  version = "0.13.0";
+  version = "0.15.1";
 
   # Fetching from GitHub instead of PyPi cause the 0.13 src release on PyPi is
   # missing some files which cause test failures.
@@ -23,7 +23,7 @@ buildPythonPackage rec {
     owner = "pysam-developers";
     repo = "pysam";
     rev = "v${version}";
-    sha256 = "1lwbcl38w1x0gciw5psjp87msmv9zzkgiqikg9b83dqaw2y5az1i";
+    sha256 = "1vj367w6xbn9bpmksm162l1aipf7cj97h1q83y7jcpm33ihwpf7x";
   };
 
   buildInputs = [ bzip2 curl cython lzma zlib ];
diff --git a/pkgs/development/python-modules/sharedmem/default.nix b/pkgs/development/python-modules/sharedmem/default.nix
new file mode 100644
index 00000000000..60c91b64109
--- /dev/null
+++ b/pkgs/development/python-modules/sharedmem/default.nix
@@ -0,0 +1,21 @@
+{ buildPythonPackage, fetchPypi, lib, numpy }:
+
+buildPythonPackage rec {
+
+  pname = "sharedmem";
+  version = "0.3.5";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1wr438m1jmcj6ccskzm6pchv6ldx7031h040adadjmkivz5rry41";
+  };
+
+  propagatedBuildInputs = [ numpy ];
+
+  meta = {
+    homepage = http://rainwoodman.github.io/sharedmem/;
+    description = "Easier parallel programming on shared memory computers";
+    maintainers = with lib.maintainers; [ edwtjo ];
+    license = lib.licenses.gpl3;
+  };
+}
diff --git a/pkgs/development/python-modules/shellingham/default.nix b/pkgs/development/python-modules/shellingham/default.nix
new file mode 100644
index 00000000000..57cafe2624c
--- /dev/null
+++ b/pkgs/development/python-modules/shellingham/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, buildPythonPackage, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "shellingham";
+  version = "1.2.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0x1hja3jzvh7xmd0sxnfw9hi3k419s95vb7jjzh76yydzvss1r2q";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Tool to Detect Surrounding Shell";
+    homepage = https://github.com/sarugaku/shellingham;
+    license = licenses.isc;
+    maintainers = with maintainers; [ mbode ];
+  };
+}