Merge master into staging
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
{ stdenv, fetchPypi
|
||||
, buildPythonApplication, python, pythonAtLeast
|
||||
, mock, nose, pyhamcrest
|
||||
, buildPythonApplication, isPy27, python, pythonOlder
|
||||
, mock, nose, pathpy, pyhamcrest, pytest
|
||||
, glibcLocales, parse, parse-type, six
|
||||
, traceback2
|
||||
}:
|
||||
buildPythonApplication rec {
|
||||
pname = "behave";
|
||||
version = "1.2.6";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
disabled = pythonAtLeast "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86";
|
||||
sha256 = "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr";
|
||||
};
|
||||
|
||||
checkInputs = [ mock nose pyhamcrest ];
|
||||
checkInputs = [ mock nose pathpy pyhamcrest pytest ];
|
||||
buildInputs = [ glibcLocales ];
|
||||
propagatedBuildInputs = [ parse parse-type six ];
|
||||
propagatedBuildInputs = [ parse parse-type six ] ++ stdenv.lib.optional (pythonOlder "3.0") traceback2;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs bin
|
||||
@@ -29,7 +28,7 @@ buildPythonApplication rec {
|
||||
export LANG="en_US.UTF-8"
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
|
||||
nosetests -x
|
||||
pytest test tests
|
||||
|
||||
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/
|
||||
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pyparsing
|
||||
, future
|
||||
, nose
|
||||
, glibcLocales
|
||||
, buildPythonPackage, fetchFromGitHub
|
||||
, future, pyparsing
|
||||
, glibcLocales, nose
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -19,7 +16,7 @@ buildPythonPackage rec {
|
||||
sha256 = "0lmlarkfbq2hp1wa04a62245jr2mqizqsdlgilj5aq6vy92gr6ai";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pyparsing future ];
|
||||
propagatedBuildInputs = [ future pyparsing ];
|
||||
|
||||
checkInputs = [ nose glibcLocales ];
|
||||
|
||||
|
||||
23
pkgs/development/python-modules/black/default.nix
Normal file
23
pkgs/development/python-modules/black/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, attrs, click }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "black";
|
||||
version = "18.4a0";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "04dffr4wmzs4vf2xj0cxp03hv04x0kk06qyzx6jjrp1mq0z3n2rr";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ attrs click ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The uncompromising Python code formatter";
|
||||
homepage = https://github.com/ambv/black;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sveitser ];
|
||||
};
|
||||
|
||||
}
|
||||
33
pkgs/development/python-modules/jieba/default.nix
Normal file
33
pkgs/development/python-modules/jieba/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, glibcLocales, python, isPy3k }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jieba";
|
||||
version = "0.39";
|
||||
|
||||
# no tests in PyPI tarball
|
||||
src = fetchFromGitHub {
|
||||
owner = "fxsjy";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0hbq0l1jbgcvm58qg4p37im4jl5a9igvq3wlhlk22pmbkbvqqgzs";
|
||||
};
|
||||
|
||||
checkInputs = [ glibcLocales ];
|
||||
|
||||
# UnicodeEncodeError
|
||||
doCheck = isPy3k;
|
||||
|
||||
# Citing https://github.com/fxsjy/jieba/issues/384: "testcases is in a mess"
|
||||
# So just picking random ones that currently work
|
||||
checkPhase = ''
|
||||
export LC_ALL=en_US.UTF-8
|
||||
${python.interpreter} test/test.py
|
||||
${python.interpreter} test/test_tokenize.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Chinese Words Segementation Utilities";
|
||||
homepage = https://github.com/fxsjy/jieba;
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
34
pkgs/development/python-modules/langcodes/default.nix
Normal file
34
pkgs/development/python-modules/langcodes/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, marisa-trie
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
, nose
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langcodes";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1axdiva2qglsjmnx2ak7i6hm0yhp6kbc4lcsgn8ckwy0nq1z3kr2";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ marisa-trie ];
|
||||
|
||||
disabled = pythonOlder "3.3";
|
||||
|
||||
checkInputs = [ nose ];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A toolkit for working with and comparing the standardized codes for languages, such as ‘en’ for English or ‘es’ for Spanish";
|
||||
homepage = http://github.com/LuminosoInsight/langcodes;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ixxie ];
|
||||
};
|
||||
}
|
||||
34
pkgs/development/python-modules/marisa-trie/default.nix
Normal file
34
pkgs/development/python-modules/marisa-trie/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytestrunner
|
||||
, pytest
|
||||
, hypothesis
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "marisa-trie";
|
||||
version = "0.7.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1n4pxnaranbh3x2fcqxwh8j1z2918vy7i4q1z4jn75m9rkm5h8ia";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "hypothesis==" "hypothesis>="
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pytestrunner ];
|
||||
|
||||
checkInputs = [ pytest hypothesis ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Static memory-efficient Trie-like structures for Python (2.x and 3.x) based on marisa-trie C++ library";
|
||||
longDescription = "There are official SWIG-based Python bindings included in C++ library distribution; this package provides alternative Cython-based pip-installable Python bindings.";
|
||||
homepage = https://github.com/kmike/marisa-trie;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ixxie ];
|
||||
};
|
||||
}
|
||||
24
pkgs/development/python-modules/mecab-python3/default.nix
Normal file
24
pkgs/development/python-modules/mecab-python3/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, mecab
|
||||
, fetchPypi
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mecab-python3";
|
||||
version = "0.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "007dg4f5fby2yl7cc44x6xwvcrf2w2ifmn0rmk56ss33mhs8l6qy";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ mecab ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python wrapper for mecab: Morphological Analysis engine";
|
||||
homepage = https://github.com/LuminosoInsight/wordfreq/;
|
||||
license = licenses.bsd0;
|
||||
maintainers = with maintainers; [ ixxie ];
|
||||
};
|
||||
}
|
||||
@@ -6,21 +6,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "parse_type";
|
||||
version = "0.3.4";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "3dd0b323bafcb8c25e000ce5589042a1c99cba9c3bec77b9f591e46bc9606147";
|
||||
sha256 = "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "python-3.5-tests-compat.patch";
|
||||
url = "https://github.com/jenisys/parse_type/pull/4.patch";
|
||||
sha256 = "1mmn2fxss6q3qhaydd4s4v8vjgvgkg41v1vcivrzdsvgsc3npg7m";
|
||||
})
|
||||
];
|
||||
|
||||
checkInputs = [ pytest pytestrunner ];
|
||||
propagatedBuildInputs = [ parse six ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34;
|
||||
|
||||
|
||||
@@ -3,22 +3,14 @@
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "parse";
|
||||
version = "1.6.6";
|
||||
version = "1.8.2";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "71435aaac494e08cec76de646de2aab8392c114e56fe3f81c565ecc7eb886178";
|
||||
sha256 = "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "python-3.5-tests-compat.patch";
|
||||
url = "https://github.com/r1chardj0n3s/parse/pull/34.patch";
|
||||
sha256 = "16iicgkf3lwivmdnp3xkq4n87wjmr3nb77z8mwz67b7by9nnp3jg";
|
||||
})
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} test_parse.py
|
||||
'';
|
||||
|
||||
23
pkgs/development/python-modules/pybindgen/default.nix
Normal file
23
pkgs/development/python-modules/pybindgen/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ stdenv, fetchPypi, buildPythonPackage, setuptools_scm, pygccxml }:
|
||||
buildPythonPackage rec {
|
||||
pname = "PyBindGen";
|
||||
version = "0.18.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1sl4jn8rildv6f62cab66w791cixhaaxl7gwg9labs099rl74yl6";
|
||||
};
|
||||
|
||||
buildInputs = [ setuptools_scm ];
|
||||
|
||||
checkInputs = [ pygccxml ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/gjcarneiro/pybindgen;
|
||||
description = "Python Bindings Generator";
|
||||
license = licenses.lgpl2;
|
||||
maintainers = with maintainers; [ teto ];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
26
pkgs/development/python-modules/pygccxml/default.nix
Normal file
26
pkgs/development/python-modules/pygccxml/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ stdenv, castxml, fetchFromGitHub, buildPythonPackage,
|
||||
llvmPackages, clang }:
|
||||
buildPythonPackage rec {
|
||||
pname = "pygccxml";
|
||||
version = "1.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gccxml";
|
||||
repo = "pygccxml";
|
||||
rev = "v${version}";
|
||||
sha256 = "02ip03s0vmp7czzflbvf7qnybibfrd0rzqbc5zfmq3zmpnck3hvm";
|
||||
};
|
||||
|
||||
buildInputs = [ castxml llvmPackages.libcxxStdenv];
|
||||
|
||||
# running the suite is hard, needs to generate xml_generator.cfg
|
||||
# but the format doesn't accept -isystem directives
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/gccxml/pygccxml;
|
||||
description = "Python package for easy C++ declarations navigation";
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ teto ];
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, fetchPypi, isPy3k, buildPythonPackage, numpy, matplotlib, root, root_numpy, tables }:
|
||||
{ lib, fetchPypi, isPy3k, buildPythonPackage, numpy, matplotlib, root, root_numpy, tables, pytest }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "rootpy";
|
||||
@@ -14,6 +14,14 @@ buildPythonPackage rec {
|
||||
|
||||
propagatedBuildInputs = [ matplotlib numpy root root_numpy tables ];
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
checkPhase = ''
|
||||
# tests fail with /homeless-shelter
|
||||
export HOME=$PWD
|
||||
# skip problematic tests
|
||||
py.test rootpy -k "not test_stl and not test_cpp and not test_xrootd_glob_single and not test_xrootd_glob_multiple"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://www.rootpy.org;
|
||||
license = licenses.bsd3;
|
||||
|
||||
51
pkgs/development/python-modules/tensorflow/bin.nix
Normal file
51
pkgs/development/python-modules/tensorflow/bin.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, buildPythonPackage
|
||||
, isPy3k, isPy36, pythonOlder
|
||||
, numpy
|
||||
, six
|
||||
, protobuf
|
||||
, absl-py
|
||||
, mock
|
||||
, backports_weakref
|
||||
, enum34
|
||||
, tensorflow-tensorboard
|
||||
, cudaSupport ? false
|
||||
}:
|
||||
|
||||
# tensorflow is built from a downloaded wheel because the source
|
||||
# build doesn't yet work on Darwin.
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "tensorflow";
|
||||
version = "1.5.0";
|
||||
format = "wheel";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-${version}-py3-none-any.whl";
|
||||
sha256 = "1mapv45n9wmgcq3i3im0pv0gmhwkxw5z69nsnxb1gfxbj1mz5h9m";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ numpy six protobuf absl-py ]
|
||||
++ lib.optional (!isPy3k) mock
|
||||
++ lib.optionals (pythonOlder "3.4") [ backports_weakref enum34 ]
|
||||
++ lib.optional (pythonOlder "3.6") tensorflow-tensorboard;
|
||||
|
||||
# tensorflow depends on tensorflow_tensorboard, which cannot be
|
||||
# built at the moment (some of its dependencies do not build
|
||||
# [htlm5lib9999999 (seven nines) -> tensorboard], and it depends on an old version of
|
||||
# bleach) Hence we disable dependency checking for now.
|
||||
installFlags = lib.optional isPy36 "--no-dependencies";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Computation using data flow graphs for scalable machine learning";
|
||||
homepage = http://tensorflow.org;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jyp abbradar ];
|
||||
platforms = platforms.darwin;
|
||||
# Python 2.7 build uses different string encoding.
|
||||
# See https://github.com/NixOS/nixpkgs/pull/37044#issuecomment-373452253
|
||||
broken = cudaSupport || !isPy3k;
|
||||
};
|
||||
}
|
||||
@@ -149,7 +149,7 @@ in buildPythonPackage rec {
|
||||
homepage = http://tensorflow.org;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jyp abbradar ];
|
||||
platforms = with platforms; if cudaSupport then linux else linux ++ darwin;
|
||||
platforms = platforms.linux;
|
||||
broken = !(xlaSupport -> cudaSupport);
|
||||
};
|
||||
}
|
||||
|
||||
48
pkgs/development/python-modules/wordfreq/default.nix
Normal file
48
pkgs/development/python-modules/wordfreq/default.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, regex
|
||||
, langcodes
|
||||
, ftfy
|
||||
, msgpack
|
||||
, mecab-python3
|
||||
, jieba
|
||||
, nose
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wordfreq";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LuminosoInsight";
|
||||
repo = "wordfreq";
|
||||
rev = "e3a1b470d9f8e0d82e9f179ffc41abba434b823b";
|
||||
sha256 = "1wjkhhj7nxfnrghwvmvwc672s30lp4b7yr98gxdxgqcq6wdshxwv";
|
||||
};
|
||||
|
||||
checkInputs = [ nose ];
|
||||
|
||||
checkPhase = ''
|
||||
# These languages require additional dictionaries
|
||||
nosetests -e test_japanese -e test_korean -e test_languages
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ regex langcodes ftfy msgpack mecab-python3 jieba ];
|
||||
|
||||
# patch to relax version requirements for regex
|
||||
# dependency to prevent break in upgrade
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py --replace "regex ==" "regex >="
|
||||
'';
|
||||
|
||||
disabled = pythonOlder "3";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A library for looking up the frequencies of words in many languages, based on many sources of data";
|
||||
homepage = https://github.com/LuminosoInsight/wordfreq/;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ixxie ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user