Merge remote-tracking branch 'upstream/master' into HEAD

This commit is contained in:
Frederik Rietdijk
2017-09-13 17:39:40 +02:00
122 changed files with 2911 additions and 1908 deletions

View File

@@ -7,12 +7,12 @@
, psutil
, memory_profiler
, pytest_xdist
, sharedLibraryExtension
}:
let
magick_wand_library = "${imagemagick}/lib/libMagickWand-6.Q16${sharedLibraryExtension}";
imagemagick_library = "${imagemagick}/lib/libMagickCore-6.Q16${sharedLibraryExtension}";
soext = stdenv.hostPlatform.extensions.sharedLibrary;
magick_wand_library = "${imagemagick}/lib/libMagickWand-6.Q16${soext}";
imagemagick_library = "${imagemagick}/lib/libMagickCore-6.Q16${soext}";
in buildPythonPackage rec {
pname = "Wand";
version = "0.4.4";

View File

@@ -28,6 +28,6 @@ buildPythonPackage rec {
meta = with stdenv.lib; {
description = "Backports of new features in Pythons weakref module";
license = licenses.psfl;
maintainers = with maintainers; [ jpbernardy ];
maintainers = with maintainers; [ jyp ];
};
}

View File

@@ -20,6 +20,6 @@ buildPythonPackage rec {
meta = {
description = "Bz2file is a Python library for reading and writing bzip2-compressed files";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jpbernardy ];
maintainers = with lib.maintainers; [ jyp ];
};
}

View File

@@ -10,11 +10,12 @@
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "ftfy";
version = "5.1.1";
# latest is 5.1.1, buy spaCy requires 4.4.3
version = "4.4.3";
src = fetchPypi {
inherit pname version;
sha256 = "67a29a2fad5f72aec2d8a0a7084e4f499ed040455133ee96b1c458609fc29e78";
sha256 = "152xdb56rhs1q4r0ck1n557sbphw7zq18r75a7kkd159ckdnc01w";
};
propagatedBuildInputs = [ html5lib wcwidth];
@@ -38,6 +39,6 @@ buildPythonPackage rec {
description = "Given Unicode text, make its representation consistent and possibly less broken.";
homepage = https://github.com/LuminosoInsight/python-ftfy/tree/master/tests;
license = licenses.mit;
maintainers = with maintainers; [ sdll ];
maintainers = with maintainers; [ sdll ];
};
}

View File

@@ -38,6 +38,6 @@ buildPythonPackage rec {
description = "Topic-modelling library";
homepage = https://radimrehurek.com/gensim/;
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [ jpbernardy ];
maintainers = with lib.maintainers; [ jyp ];
};
}

View File

@@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, sphinx
, numpydoc
, isPy3k
, stdenv
}:
buildPythonPackage rec {
pname = "joblib";
name = "${pname}-${version}";
version = "0.10.3";
src = fetchPypi {
inherit pname version;
sha256 = "29b2965a9efbc90a5fe66a389ae35ac5b5b0c1feabfc7cab7fd5d19f429a071d";
};
checkInputs = [ nose sphinx numpydoc ];
# Failing test on Python 3.x and Darwin
postPatch = '''' + lib.optionalString (isPy3k || stdenv.isDarwin) ''
sed -i -e '70,84d' joblib/test/test_format_stack.py
# test_nested_parallel_warnings: ValueError: Non-zero return code: -9.
# Not sure why but it's nix-specific. Try removing for new joblib releases.
rm joblib/test/test_parallel.py
'';
meta = {
description = "Lightweight pipelining: using Python functions as pipeline jobs";
homepage = http://pythonhosted.org/joblib/;
license = lib.licenses.bsd3;
};
}

View File

@@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, jupyter_client
, ipython
, ipykernel
, prompt_toolkit
, pygments
}:
buildPythonPackage rec {
pname = "jupyter_console";
version = "5.2.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "545dedd3aaaa355148093c5609f0229aeb121b4852995c2accfa64fe3e0e55cd";
};
checkInputs = [ nose ];
propagatedBuildInputs = [
jupyter_client
ipython
ipykernel
prompt_toolkit
pygments
];
# ValueError: underlying buffer has been detached
doCheck = false;
meta = {
description = "Jupyter terminal console";
homepage = "http://jupyter.org/";
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
};
}

View File

@@ -21,6 +21,8 @@ buildPythonPackage rec {
propagatedBuildInputs = [ secretstorage ];
doCheck = !stdenv.isDarwin;
checkPhase = ''
py.test $out
'';

View File

@@ -21,7 +21,6 @@ buildPythonPackage rec {
homepage = "https://github.com/mitya57/secretstorage";
description = "Python bindings to FreeDesktop.org Secret Service API";
license = licenses.bsdOriginal;
platforms = platforms.linux;
maintainer = with maintainers; [ teto ];
};
}

View File

@@ -1,5 +1,5 @@
{ stdenv, buildPythonPackage, fetchPypi
, geos, glibcLocales, pytest, cython, sharedLibraryExtension
, geos, glibcLocales, pytest, cython
, numpy
}:
@@ -26,7 +26,7 @@ buildPythonPackage rec {
patchPhase = let
libc = if stdenv.isDarwin then "libc.dylib" else "libc.so.6";
in ''
sed -i "s|_lgeos = load_dll('geos_c', fallbacks=.*)|_lgeos = load_dll('geos_c', fallbacks=['${geos}/lib/libgeos_c${sharedLibraryExtension}'])|" shapely/geos.py
sed -i "s|_lgeos = load_dll('geos_c', fallbacks=.*)|_lgeos = load_dll('geos_c', fallbacks=['${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}'])|" shapely/geos.py
sed -i "s|free = load_dll('c').free|free = load_dll('c', fallbacks=['${stdenv.cc.libc}/lib/${stdenv.cc.libc}']).free|" shapely/geos.py
'';

View File

@@ -23,6 +23,6 @@ buildPythonPackage rec {
meta = {
license = lib.licenses.mit;
description = "smart_open is a Python 2 & Python 3 library for efficient streaming of very large file";
maintainers = with lib.maintainers; [ jpbernardy ];
maintainers = with lib.maintainers; [ jyp ];
};
}

View File

@@ -1,7 +1,7 @@
{ stdenv
, fetchurl
, buildPythonPackage
, isPy35, isPy27
, isPy36, isPy35, isPy27
, cudaSupport ? false
, cudatoolkit ? null
, cudnn ? null
@@ -32,7 +32,7 @@ buildPythonPackage rec {
version = "1.1.0";
name = "${pname}-${version}";
format = "wheel";
disabled = ! (isPy35 || isPy27);
disabled = ! (isPy36 || isPy35 || isPy27);
src = let
tfurl = sys: proc: pykind:
@@ -59,33 +59,47 @@ buildPythonPackage rec {
url = tfurl "linux" "cpu" "cp27-none-linux_x86_64";
sha256 = "0ld3hqx3idxk0zcrvn3p9yqnmx09zsj3mw66jlfw6fkv5hznx8j2";
};
py3 = {
py35 = {
url = tfurl "linux" "cpu" "cp35-cp35m-linux_x86_64";
sha256 = "0ahz9222rzqrk43lb9w4m351klkm6mlnnvw8xfqip28vbmymw90b";
};
py36 = {
url = tfurl "linux" "cpu" "cp36-cp36m-linux_x86_64";
sha256 = "1a2cc8ihl94iqff76nxg6bq85vfb7sj5cvvi9sxy2f43k32fi4lv";
};
};
linux-x86_64.cuda = {
py2 = {
url = tfurl "linux" "gpu" "cp27-none-linux_x86_64";
sha256 = "1baa9jwr6f8f62dyx6isbw8yyrd0pi1dz1srjblfqsyk1x3pnfvh";
};
py3 = {
py35 = {
url = tfurl "linux" "gpu" "cp35-cp35m-linux_x86_64";
sha256 = "0606m2awy0ifhniy8lsyhd0xc388dgrwksn87989xlgy90wpxi92";
};
py36 = {
url = tfurl "linux" "gpu" "cp36-cp36m-linux_x86_64";
sha256 = "0lvbmfa87qzrajadpsf13gi3l71vryzkryzqfvkykivqrdjsvj8q";
};
};
};
in
fetchurl (
if stdenv.isDarwin then
if isPy35 then
dls.darwin.cpu.py3
else
if isPy27 then
dls.darwin.cpu.py2
else
dls.darwin.cpu.py3
else if isPy36 then
if cudaSupport then
dls.linux-x86_64.cuda.py36
else dls.linux-x86_64.cpu.py36
else if isPy35 then
if cudaSupport then
dls.linux-x86_64.cuda.py3
else dls.linux-x86_64.cpu.py3
dls.linux-x86_64.cuda.py35
else dls.linux-x86_64.cpu.py35
else
if cudaSupport then
dls.linux-x86_64.cuda.py2
@@ -119,7 +133,7 @@ buildPythonPackage rec {
description = "TensorFlow helps the tensors flow";
homepage = http://tensorflow.org;
license = licenses.asl20;
maintainers = with maintainers; [ jpbernardy ];
maintainers = with maintainers; [ jyp ];
platforms = with platforms; if cudaSupport then linux else linux ++ darwin;
};
}