Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2018-11-24 10:43:33 +01:00
92 changed files with 1146 additions and 386 deletions

View File

@@ -0,0 +1,25 @@
{ stdenv, buildPythonPackage, fetchPypi, numpy, cython }:
buildPythonPackage rec {
pname = "libmr";
version = "0.1.9";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "43ccd86693b725fa3abe648c8cdcef17ba5fa46b5528168829e5f9b968dfeb70";
};
propagatedBuildInputs = [ numpy cython ];
# No tests in the pypi tarball
doCheck = false;
meta = with stdenv.lib; {
description = "libMR provides core MetaRecognition and Weibull fitting functionality";
homepage = https://github.com/Vastlab/libMR;
license = licenses.bsd3;
maintainers = with maintainers; [ psyanticy ];
};
}

View File

@@ -0,0 +1,25 @@
{ stdenv, buildPythonPackage, fetchPypi, requests }:
buildPythonPackage rec {
pname = "nanoleaf";
version = "0.4.1";
src = fetchPypi {
inherit pname version;
sha256 = "17dmxibfjmwnrs6ng5cmvfis3cv6iw267xb8n1pijy15y9dz0s8s";
};
prePatch = ''
sed -i '/^gitVersion =/d' setup.py
substituteInPlace setup.py --replace 'gitVersion' '"${version}"'
'';
propagatedBuildInputs = [ requests ];
meta = with stdenv.lib; {
description = "A python interface for Nanoleaf Aurora lighting";
homepage = https://github.com/software-2/nanoleaf;
license = licenses.mit;
maintainers = with maintainers; [ elseym ];
};
}

View File

@@ -22,7 +22,7 @@ buildPythonPackage rec {
meta = with stdenv.lib; {
description = "Simple Python library for easily displaying tabular data in a visually appealing ASCII table format";
homepage = http://code.google.com/p/prettytable/;
license = licenses.bsd0;
license = licenses.bsd3;
};
}

View File

@@ -1,6 +1,6 @@
{ lib, buildPythonPackage, fetchPypi
, cryptography, ecdsa
, pytestrunner, pytestcov, pytest }:
, pytestrunner, pytestcov, pytest_37 }:
buildPythonPackage rec {
pname = "PyJWT";
@@ -13,7 +13,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ cryptography ecdsa ];
checkInputs = [ pytestrunner pytestcov pytest ];
checkInputs = [ pytestrunner pytestcov pytest_37 ];
meta = with lib; {
description = "JSON Web Token implementation in Python";

View File

@@ -0,0 +1,26 @@
{ lib, buildPythonPackage, fetchPypi, freetds, cython, setuptools-git }:
buildPythonPackage rec {
pname = "pymssql";
version = "2.1.4";
src = fetchPypi {
inherit pname version;
sha256 = "1yvs3azd8dkf40lybr9wvswvf4hbxn5ys9ypansmbbb328dyn09j";
};
buildInputs = [cython setuptools-git];
propagatedBuildInputs = [freetds];
# The tests require a running instance of SQLServer, so we skip them
doCheck = false;
meta = with lib; {
homepage = http://pymssql.org/en/stable/;
description = "A simple database interface for Python that builds on top
of FreeTDS to provide a Python DB-API (PEP-249) interface to Microsoft
SQL Server";
license = licenses.lgpl21;
maintainers = with maintainers; [ mredaelli ];
};
}

View File

@@ -0,0 +1,31 @@
{ buildPythonPackage, fetchPypi, lib, pillow, tesseract, substituteAll }:
buildPythonPackage rec {
pname = "pytesseract";
version = "0.2.5";
src = fetchPypi {
inherit pname version;
sha256 = "0wlz1vbg1k8cdrpzvrahjnbsfs4ki6xqhbkv17ycfchh7h6kfkfm";
};
patches = [
(substituteAll {
src = ./tesseract-binary.patch;
drv = "${tesseract}";
})
];
buildInputs = [ tesseract ];
propagatedBuildInputs = [ pillow ];
# the package doesn't have any tests.
doCheck = false;
meta = with lib; {
homepage = https://pypi.org/project/pytesseract/;
license = licenses.gpl3;
description = "A Python wrapper for Google Tesseract";
maintainers = with maintainers; [ ma27 ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/pytesseract.py b/src/pytesseract.py
index 32713cf..5f9209d 100755
--- a/src/pytesseract.py
+++ b/src/pytesseract.py
@@ -25,7 +25,7 @@ if numpy_installed:
from numpy import ndarray
# CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY
-tesseract_cmd = 'tesseract'
+tesseract_cmd = '@drv@/bin/tesseract'
RGB_MODE = 'RGB'
OSD_KEYS = {
'Page number': ('page_num', int),

View File

@@ -2,46 +2,59 @@
, setuptools_scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools
, atomicwrites, mock, writeText, pathlib2
}:
buildPythonPackage rec {
version = "3.9.3";
pname = "pytest";
preCheck = ''
# don't test bash builtins
rm testing/test_argcomplete.py
'';
let generic = { version, sha256 }:
buildPythonPackage rec {
pname = "pytest";
inherit version;
src = fetchPypi {
inherit pname version;
preCheck = ''
# don't test bash builtins
rm testing/test_argcomplete.py
'';
src = fetchPypi {
inherit pname version sha256;
};
checkInputs = [ hypothesis mock ];
buildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites]
++ stdenv.lib.optionals (!isPy3k) [ funcsigs ]
++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
checkPhase = ''
runHook preCheck
$out/bin/py.test -x testing/
runHook postCheck
'';
# Remove .pytest_cache when using py.test in a Nix build
setupHook = writeText "pytest-hook" ''
pytestcachePhase() {
find $out -name .pytest_cache -type d -exec rm -rf {} +
}
preDistPhases+=" pytestcachePhase"
'';
meta = with stdenv.lib; {
homepage = https://docs.pytest.org;
description = "Framework for writing tests";
maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
license = licenses.mit;
platforms = platforms.unix;
};
};
in {
pytest_39 = generic {
version = "3.9.3";
sha256 = "a9e5e8d7ab9d5b0747f37740276eb362e6a76275d76cebbb52c6049d93b475db";
};
checkInputs = [ hypothesis mock ];
buildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites]
++ stdenv.lib.optionals (!isPy3k) [ funcsigs ]
++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
checkPhase = ''
runHook preCheck
$out/bin/py.test -x testing/
runHook postCheck
'';
# Remove .pytest_cache when using py.test in a Nix build
setupHook = writeText "pytest-hook" ''
pytestcachePhase() {
find $out -name .pytest_cache -type d -exec rm -rf {} +
}
preDistPhases+=" pytestcachePhase"
'';
meta = with stdenv.lib; {
homepage = https://docs.pytest.org;
description = "Framework for writing tests";
maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
license = licenses.mit;
platforms = platforms.unix;
pytest_37 = generic {
version = "3.7.4";
sha256 = "2d7c49e931316cc7d1638a3e5f54f5d7b4e5225972b3c9838f3584788d27f349";
};
}