Merge master into staging

This commit is contained in:
Frederik Rietdijk
2018-10-18 11:43:54 +02:00
88 changed files with 737 additions and 408 deletions

View File

@@ -0,0 +1,35 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, setuptools_scm
, future
, isPy3k
, python
, hypothesis
}:
buildPythonPackage rec {
version = "0.1.1";
pname = "backports.os";
disabled = isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "b472c4933094306ca08ec90b2a8cbb50c34f1fb2767775169a1c1650b7b74630";
};
buildInputs = [ setuptools_scm ];
checkInputs = [ hypothesis ];
propagatedBuildInputs = [ future ];
checkPhase = ''
${python.interpreter} -m unittest discover tests
'';
meta = with stdenv.lib; {
homepage = https://github.com/pjdelport/backports.os;
description = "Backport of new features in Python's os module";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,53 @@
{ pkgs
, buildPythonPackage
, fetchPypi
, six
, nose
, appdirs
, scandir
, backports_os
, typing
, pytz
, enum34
, pyftpdlib
, psutil
, mock
, pythonAtLeast
, isPy3k
}:
buildPythonPackage rec {
pname = "fs";
version = "2.1.1";
src = fetchPypi {
inherit pname version;
sha256 = "b20a4aeac9079b194f0160957d4265bb6c99ce68f1b12e980b0fb96f74aafb70";
};
buildInputs = [ pkgs.glibcLocales ];
checkInputs = [ nose pyftpdlib mock psutil ];
propagatedBuildInputs = [ six appdirs pytz ]
++ pkgs.lib.optionals (!isPy3k) [ backports_os ]
++ pkgs.lib.optionals (!pythonAtLeast "3.6") [ typing ]
++ pkgs.lib.optionals (!pythonAtLeast "3.5") [ scandir ]
++ pkgs.lib.optionals (!pythonAtLeast "3.5") [ enum34 ];
postPatch = ''
# required for installation
touch LICENSE
# tests modify home directory results in (4 tests failing) / 1600
rm tests/test_appfs.py tests/test_opener.py
'';
LC_ALL="en_US.utf-8";
meta = with pkgs.lib; {
description = "Filesystem abstraction";
homepage = https://github.com/PyFilesystem/pyfilesystem2;
license = licenses.bsd3;
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix;
};
}

View File

@@ -8,7 +8,7 @@
, mock
}:
if !(pythonOlder "3.4") then null else buildPythonPackage rec {
buildPythonPackage rec {
pname = "pathlib2";
version = "2.3.2";

View File

@@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "pvlib";
version = "0.5.2";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "1897v9qq97nk5n0hfm9089yz8pffd42795mnhcyq48g9bsyap1xi";
sha256 = "1j2p6w41hv7k604jbcpxvs5f04y8dsfdvd3d202l60ks0fc0agyj";
};
checkInputs = [ pytest ];

View File

@@ -0,0 +1,33 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, mock
, psutil
, pyopenssl
, pysendfile
, python
}:
buildPythonPackage rec {
version = "1.5.4";
pname = "pyftpdlib";
src = fetchPypi {
inherit pname version;
sha256 = "e5fca613978743d41c3bfc68e25a811d646a3b8a9eee9eb07021daca89646a0f";
};
checkInputs = [ mock psutil ];
propagatedBuildInputs = [ pyopenssl pysendfile ];
checkPhase = ''
${python.interpreter} pyftpdlib/test/runner.py
'';
meta = with stdenv.lib; {
homepage = https://github.com/giampaolo/pyftpdlib/;
description = "Very fast asynchronous FTP server library";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, attrs, hypothesis, py
{ stdenv, buildPythonPackage, pythonOlder, fetchPypi, attrs, hypothesis, py
, setuptools_scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools
, atomicwrites, mock, writeText, pathlib2
}:
@@ -19,7 +19,8 @@ buildPythonPackage rec {
checkInputs = [ hypothesis mock ];
buildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites]
++ stdenv.lib.optionals (!isPy3k) [ funcsigs pathlib2 ];
++ stdenv.lib.optionals (!isPy3k) [ funcsigs ]
++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
checkPhase = ''
runHook preCheck

View File

@@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi, py4j }:
buildPythonPackage rec {
pname = "python-ldap-test";
version = "0.3.1";
src = fetchPypi {
inherit pname version;
sha256 = "1qh9x3lncaldnw79fgpqbayichs8pbz8abr6pxb5qxbs7zrnyrwf";
};
propagatedBuildInputs = [ py4j ];
# Tests needs java to be present in path
doCheck = false;
meta = with stdenv.lib; {
description = "Tool for testing code speaking with LDAP server";
homepage = https://github.com/zoldar/python-ldap-test;
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
};
}

View File

@@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi, sh }:
buildPythonPackage rec {
pname = "python-packer";
version = "0.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "fd363dae9bd2efd447739bbf7a4f29c1e4741596ae7b02d252fe525b2b4176e7";
};
propagatedBuildInputs = [ sh ];
# Tests requires network connections
doCheck = false;
meta = with stdenv.lib; {
description = "An interface for packer.io";
homepage = https://github.com/nir0s/python-packer;
license = licenses.asl20;
maintainers = with maintainers; [ psyanticy ];
};
}

View File

@@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
}:
# cannot be built as pythonApplication because the library functions are
# required for home-assistant
buildPythonPackage rec {
pname = "speedtest-cli";
version = "2.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "2f3d5aa1086d9b367c03b99db6e3207525af174772d877c6b982289b8d2bdefe";
};
# tests require working internet connection
doCheck = false;
meta = with lib; {
description = "Command line interface for testing internet bandwidth using speedtest.net";
homepage = https://github.com/sivel/speedtest-cli;
license = licenses.asl20;
maintainers = with maintainers; [ makefu domenkozar ndowens ];
};
}