Merge remote-tracking branch 'upstream/master' into HEAD
This commit is contained in:
33
pkgs/development/python-modules/cymem/default.nix
Normal file
33
pkgs/development/python-modules/cymem/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, cython
|
||||
, python
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
name = "cymem-${version}";
|
||||
version = "1.31.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "explosion";
|
||||
repo = "cymem";
|
||||
rev = "1.31.2";
|
||||
sha256 = "0miznr4kbdzw8yik3m96jmrlmln4qv7z3i3qdp7wjqr51zpqfm1k";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cython
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
cd cymem/tests
|
||||
${python.interpreter} -m unittest discover -p "*test*"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Cython memory pool for RAII-style memory management";
|
||||
homepage = https://github.com/explosion/cymem;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sdll ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ stdenv, buildPythonPackage, fetchFromGitHub
|
||||
, vobject, mock, tox, pytestcov, pytest-django, pytest, shortuuid
|
||||
, django, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django-extensions";
|
||||
version = "1.8.1";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "${pname}";
|
||||
repo = "${pname}";
|
||||
rev = "${version}";
|
||||
sha256 = "08rd9zswvjb9dixzyd3p3l3hw3wwhqkgyjvid65niybzjl1xdb5h";
|
||||
};
|
||||
|
||||
buildInputs = [ vobject mock tox pytestcov pytest-django pytest shortuuid ];
|
||||
|
||||
propagatedBuildInputs = [ django six ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A collection of custom extensions for the Django Framework";
|
||||
homepage = https://github.com/django-extensions/django-extensions;
|
||||
licenses = [ licenses.mit ];
|
||||
};
|
||||
}
|
||||
35
pkgs/development/python-modules/ftfy/default.nix
Normal file
35
pkgs/development/python-modules/ftfy/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, html5lib
|
||||
, wcwidth
|
||||
, nose
|
||||
, python
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "ftfy";
|
||||
version = "4.4.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "152xdb56rhs1q4r0ck1n557sbphw7zq18r75a7kkd159ckdnc01w";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ html5lib wcwidth];
|
||||
|
||||
buildInputs = [
|
||||
nose
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests -v
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
43
pkgs/development/python-modules/gst-python/default.nix
Normal file
43
pkgs/development/python-modules/gst-python/default.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ fetchurl, stdenv, pkgconfig, python, pygobject3
|
||||
, gst-plugins-base, ncurses
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gst-python";
|
||||
version = "1.10.4";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"${meta.homepage}/src/gst-python/${name}.tar.xz"
|
||||
"mirror://gentoo/distfiles/${name}.tar.xz"
|
||||
];
|
||||
sha256 = "04l2hvvz9b0f3nyds1k3yfk5di8a91fpr6maj19c11mwp1s82l2r";
|
||||
};
|
||||
|
||||
patches = [ ./different-path-with-pygobject.patch ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig python ];
|
||||
|
||||
# XXX: in the Libs.private field of python3.pc
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
preConfigure = ''
|
||||
export configureFlags="$configureFlags --with-pygi-overrides-dir=$out/lib/${python.sitePackages}/gi/overrides"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ gst-plugins-base pygobject3 ];
|
||||
|
||||
# Needed for python.buildEnv
|
||||
passthru.pythonPath = [];
|
||||
|
||||
meta = {
|
||||
homepage = http://gstreamer.freedesktop.org;
|
||||
|
||||
description = "Python bindings for GStreamer";
|
||||
|
||||
license = stdenv.lib.licenses.lgpl2Plus;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
diff -Nru gst-python-1.2.0-orig/gi/overrides/Makefile.in gst-python-1.2.0/gi/overrides/Makefile.in
|
||||
--- gst-python-1.2.0-orig/gi/overrides/Makefile.in 2014-03-22 21:47:56.235364405 +0800
|
||||
+++ gst-python-1.2.0/gi/overrides/Makefile.in 2014-03-22 21:48:28.737958066 +0800
|
||||
@@ -356,7 +356,7 @@
|
||||
|
||||
# We install everything in the gi/overrides folder
|
||||
pygioverridesdir = $(PYGI_OVERRIDES_DIR)
|
||||
-pygioverrides_PYTHON = Gst.py GstPbutils.py
|
||||
+pygioverrides_PYTHON = Gst.py GstPbutils.py __init__.py
|
||||
pygioverridesexecdir = $(PYGI_OVERRIDES_DIR)
|
||||
EXTRA_DIST = Gst.py
|
||||
INCLUDES = $(PYTHON_INCLUDES)
|
||||
diff -Nru gst-python-1.2.0-orig/gi/overrides/__init__.py gst-python-1.2.0/gi/overrides/__init__.py
|
||||
--- gst-python-1.2.0-orig/gi/overrides/__init__.py 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ gst-python-1.2.0/gi/overrides/__init__.py 2014-03-22 21:48:15.442124287 +0800
|
||||
@@ -0,0 +1,4 @@
|
||||
+from pkgutil import extend_path
|
||||
+
|
||||
+__path__ = extend_path(__path__, __name__)
|
||||
+print(__path__, __name__)
|
||||
34
pkgs/development/python-modules/murmurhash/default.nix
Normal file
34
pkgs/development/python-modules/murmurhash/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, cython
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "murmurhash-${version}";
|
||||
version = "0.26.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "explosion";
|
||||
repo = "murmurhash";
|
||||
rev = "0.26.4";
|
||||
sha256 = "0n2j0glhlv2yh3fjgbg4d79j1c1fpchgjd4vnpw908l9mzchhmdv";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
cython
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
cd murmurhash/tests
|
||||
${python.interpreter} -m unittest discover -p "*test*"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Cython bindings for MurmurHash2";
|
||||
homepage = https://github.com/explosion/murmurhash;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sdll ];
|
||||
};
|
||||
}
|
||||
27
pkgs/development/python-modules/plac/default.nix
Normal file
27
pkgs/development/python-modules/plac/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "plac";
|
||||
version = "0.9.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "16zqpalx4i1n1hrcvaj8sdixapy2g76fc13bbahz0xc106d72gxs";
|
||||
};
|
||||
|
||||
checkPhase = ''
|
||||
cd doc
|
||||
${python.interpreter} -m unittest discover -p "*test_plac*"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Parsing the Command Line the Easy Way";
|
||||
homepage = https://github.com/micheles/plac;
|
||||
license = licenses.bsdOriginal;
|
||||
maintainers = with maintainers; [ sdll ];
|
||||
};
|
||||
}
|
||||
37
pkgs/development/python-modules/preshed/default.nix
Normal file
37
pkgs/development/python-modules/preshed/default.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytest
|
||||
, cython
|
||||
, cymem
|
||||
, python
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "preshed";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1pdl4p2d32ficfh18xdkgsj6ajzdxc6mxhhf84z0wq1l8viskcx6";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cython
|
||||
cymem
|
||||
];
|
||||
buildInputs = [
|
||||
pytest
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} setup.py test
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Cython hash tables that assume keys are pre-hashed";
|
||||
homepage = https://github.com/explosion/preshed;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sdll ];
|
||||
};
|
||||
}
|
||||
76
pkgs/development/python-modules/spacy/default.nix
Normal file
76
pkgs/development/python-modules/spacy/default.nix
Normal file
@@ -0,0 +1,76 @@
|
||||
{ stdenv
|
||||
, pkgs
|
||||
, buildPythonPackage
|
||||
, python
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, pytest
|
||||
, cython
|
||||
, cymem
|
||||
, preshed
|
||||
, pathlib2
|
||||
, numpy
|
||||
, murmurhash
|
||||
, plac
|
||||
, six
|
||||
, ujson
|
||||
, dill
|
||||
, requests
|
||||
, ftfy
|
||||
, thinc
|
||||
, pip
|
||||
}:
|
||||
let
|
||||
enableDebugging = true;
|
||||
regexLocked = buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "regex";
|
||||
version = "2017.04.05";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0c95gf3jzz8mv52lkgq0h7sbasjwvdhghm4s0phmy5k9sr78f4fq";
|
||||
};
|
||||
};
|
||||
in buildPythonPackage rec {
|
||||
name = "spacy-${version}";
|
||||
version = "1.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "explosion";
|
||||
repo = "spaCy";
|
||||
rev = "v${version}";
|
||||
sha256 = "0v3bmmar31a6968y4wl0lmgnc3829l2mnwd8s959m4pqw1y1w648";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cython
|
||||
cymem
|
||||
pathlib2
|
||||
preshed
|
||||
numpy
|
||||
murmurhash
|
||||
plac
|
||||
six
|
||||
ujson
|
||||
dill
|
||||
requests
|
||||
regexLocked
|
||||
ftfy
|
||||
thinc
|
||||
pytest
|
||||
pip
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
# checkPhase = ''
|
||||
# ${python.interpreter} -m pytest spacy/tests --vectors --models --slow
|
||||
# '';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
|
||||
homepage = https://github.com/explosion/spaCy;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sdll ];
|
||||
};
|
||||
}
|
||||
84
pkgs/development/python-modules/thinc/default.nix
Normal file
84
pkgs/development/python-modules/thinc/default.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{ stdenv
|
||||
, pkgs
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, pytest
|
||||
, cython
|
||||
, cymem
|
||||
, preshed
|
||||
, numpy
|
||||
, python
|
||||
, murmurhash
|
||||
, hypothesis
|
||||
, tqdm
|
||||
, cytoolz
|
||||
, plac
|
||||
, six
|
||||
, mock
|
||||
, termcolor
|
||||
, wrapt
|
||||
, dill
|
||||
}:
|
||||
|
||||
let
|
||||
enableDebugging = true;
|
||||
|
||||
pathlibLocked = buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "pathlib";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39";
|
||||
};
|
||||
|
||||
doCheck = false; # fails to import support from test
|
||||
};
|
||||
in buildPythonPackage rec {
|
||||
name = "thinc-${version}";
|
||||
version = "6.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "explosion";
|
||||
repo = "thinc";
|
||||
rev = "v${version}";
|
||||
sha256 = "008kmjsvanh6qgnpvsn3qacfcyprxirxbw4yfd8flyg7mxw793ws";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cython
|
||||
cymem
|
||||
preshed
|
||||
numpy
|
||||
murmurhash
|
||||
pytest
|
||||
hypothesis
|
||||
tqdm
|
||||
cytoolz
|
||||
plac
|
||||
six
|
||||
mock
|
||||
termcolor
|
||||
wrapt
|
||||
dill
|
||||
pathlibLocked
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
# fails to import some modules
|
||||
# checkPhase = ''
|
||||
# ${python.interpreter} -m pytest thinc/tests
|
||||
# # cd thinc/tests
|
||||
# # ${python.interpreter} -m unittest discover -p "*test*"
|
||||
# '';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Practical Machine Learning for NLP in Python";
|
||||
homepage = https://github.com/explosion/thinc;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sdll ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user