about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-03-26 18:01:56 +0000
committerGitHub <noreply@github.com>2022-03-26 18:01:56 +0000
commit77dc421883b42aff99b04b3077ae9ab36af7ed90 (patch)
treec03fb06e4961ca57632e3bf9bea76269c9d942ca /pkgs/development/python-modules
parentf97a925ba30ae62216b4bd00ba182308b1951977 (diff)
parent3b6f03e4979b24171b38f47385b96049a48a8682 (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/aiohue/default.nix27
-rw-r--r--pkgs/development/python-modules/anyconfig/default.nix48
-rw-r--r--pkgs/development/python-modules/behave/default.nix4
-rw-r--r--pkgs/development/python-modules/google-cloud-speech/default.nix2
-rw-r--r--pkgs/development/python-modules/nested-lookup/default.nix36
-rw-r--r--pkgs/development/python-modules/passlib/default.nix8
-rw-r--r--pkgs/development/python-modules/publicsuffix2/default.nix24
-rwxr-xr-xpkgs/development/python-modules/zstandard/default.nix22
8 files changed, 143 insertions, 28 deletions
diff --git a/pkgs/development/python-modules/aiohue/default.nix b/pkgs/development/python-modules/aiohue/default.nix
index 5862a7e65a6e9..40620cb13f4e6 100644
--- a/pkgs/development/python-modules/aiohue/default.nix
+++ b/pkgs/development/python-modules/aiohue/default.nix
@@ -1,35 +1,46 @@
 { lib
-, buildPythonPackage
-, fetchPypi
 , aiohttp
 , asyncio-throttle
+, awesomeversion
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
 , pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "aiohue";
-  version = "4.3.0";
+  version = "4.4.1";
   format = "setuptools";
 
   disabled = pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-PslmDeG/o9WAOc0FhidUNaISrlXa3rba3UEuvPVN/+A=";
+  src = fetchFromGitHub {
+    owner = "home-assistant-libs";
+    repo = pname;
+    rev = version;
+    hash = "sha256-zXjfPd40yYyAuuW4CmaGRvJuORyQJa+6CFQaO6RQPZo=";
   };
 
   propagatedBuildInputs = [
+    awesomeversion
     aiohttp
     asyncio-throttle
   ];
 
+  checkInputs = [
+    pytestCheckHook
+  ];
+
   pythonImportsCheck = [
     "aiohue"
     "aiohue.discovery"
   ];
 
-  # Project has no tests
-  doCheck = false;
+  disabledTestPaths = [
+    # File are prefixed with test_
+    "examples/"
+  ];
 
   meta = with lib; {
     description = "Python package to talk to Philips Hue";
diff --git a/pkgs/development/python-modules/anyconfig/default.nix b/pkgs/development/python-modules/anyconfig/default.nix
new file mode 100644
index 0000000000000..3e0e347bbfa3d
--- /dev/null
+++ b/pkgs/development/python-modules/anyconfig/default.nix
@@ -0,0 +1,48 @@
+{ buildPythonPackage
+, fetchPypi
+, lib
+, pytestCheckHook
+, setuptools
+}:
+
+buildPythonPackage rec {
+  pname = "anyconfig";
+  version = "0.12.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256-MJHXZ1dAaG+t6FdVU38qfGzO+oZZxbtWF04C3tdLltU=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "--cov=src -vv" ""
+  '';
+
+  propagatedBuildInputs = [
+    setuptools
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # OSError: /build/anyconfig-0.12.0/tests/res/cli/no_template/10/e/10.* should exists but not
+    "test_runs_for_datasets"
+  ];
+
+  disabledTestPaths = [
+    # NameError: name 'TT' is not defined
+    "tests/schema/test_jsonschema.py"
+  ];
+
+  pythonImportsCheck = [ "anyconfig" ];
+
+  meta = with lib; {
+    description = "Python library provides common APIs to load and dump configuration files in various formats";
+    homepage = "https://github.com/ssato/python-anyconfig";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tboerger ];
+  };
+}
diff --git a/pkgs/development/python-modules/behave/default.nix b/pkgs/development/python-modules/behave/default.nix
index 1198f034d00ab..2384a51e50233 100644
--- a/pkgs/development/python-modules/behave/default.nix
+++ b/pkgs/development/python-modules/behave/default.nix
@@ -7,13 +7,13 @@
 
 buildPythonApplication rec {
   pname = "behave";
-  version = "1.2.7.dev1";
+  version = "1.2.7.dev2";
 
   src = fetchFromGitHub {
     owner = "behave";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1ssgixmqlg8sxsyalr83a1970njc2wg3zl8idsmxnsljwacv7qwv";
+    hash = "sha256-B8PUN1Q4UAsDWrHjPZDlpaPjCKjI/pAogCSI+BQnaWs=";
   };
 
   checkInputs = [ pytestCheckHook mock pathpy pyhamcrest pytest-html ];
diff --git a/pkgs/development/python-modules/google-cloud-speech/default.nix b/pkgs/development/python-modules/google-cloud-speech/default.nix
index e461b4cdcb53c..72e9f672047a2 100644
--- a/pkgs/development/python-modules/google-cloud-speech/default.nix
+++ b/pkgs/development/python-modules/google-cloud-speech/default.nix
@@ -8,6 +8,7 @@
 , pytestCheckHook
 , pytest-asyncio
 , pythonOlder
+, setuptools
 }:
 
 buildPythonPackage rec {
@@ -26,6 +27,7 @@ buildPythonPackage rec {
     libcst
     google-api-core
     proto-plus
+    setuptools
   ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/nested-lookup/default.nix b/pkgs/development/python-modules/nested-lookup/default.nix
new file mode 100644
index 0000000000000..7e56158ff1453
--- /dev/null
+++ b/pkgs/development/python-modules/nested-lookup/default.nix
@@ -0,0 +1,36 @@
+{ buildPythonPackage
+, fetchFromGitHub
+, lib
+, pytestCheckHook
+, six
+}:
+
+buildPythonPackage rec {
+  pname = "nested-lookup";
+  version = "0.2.23";
+
+  src = fetchFromGitHub {
+    owner = "russellballestrini";
+    repo = "nested-lookup";
+    # https://github.com/russellballestrini/nested-lookup/issues/47
+    rev = "c1b0421479efa378545bc71efa3b72882e8fec17";
+    sha256 = "sha256-jgfYLSsFLQSsOH4NzbDPKFIG+tWWZ1zTWcZEaX2lthg=";
+  };
+
+  propagatedBuildInputs = [
+    six
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "nested_lookup" ];
+
+  meta = with lib; {
+    description = "Python functions for working with deeply nested documents (lists and dicts)";
+    homepage = "https://github.com/russellballestrini/nested-lookup";
+    license = licenses.publicDomain;
+    maintainers = with maintainers; [ tboerger ];
+  };
+}
diff --git a/pkgs/development/python-modules/passlib/default.nix b/pkgs/development/python-modules/passlib/default.nix
index c4bcfaf85932c..ab29ab74d6849 100644
--- a/pkgs/development/python-modules/passlib/default.nix
+++ b/pkgs/development/python-modules/passlib/default.nix
@@ -1,4 +1,5 @@
-{ buildPythonPackage
+{ lib
+, buildPythonPackage
 , fetchPypi
 , nose
 , bcrypt
@@ -18,8 +19,9 @@ buildPythonPackage rec {
   propagatedBuildInputs = [ bcrypt argon2_cffi ];
   propagatedNativeBuildInputs = [ argon2_cffi ];
 
-  meta = {
+  meta = with lib; {
     description = "A password hashing library for Python";
-    homepage    = "https://code.google.com/p/passlib/";
+    homepage = "https://foss.heptapod.net/python-libs/passlib";
+    license = licenses.bsdOriginal;
   };
 }
diff --git a/pkgs/development/python-modules/publicsuffix2/default.nix b/pkgs/development/python-modules/publicsuffix2/default.nix
index 30a02ec2f0ddd..67699b107ab5b 100644
--- a/pkgs/development/python-modules/publicsuffix2/default.nix
+++ b/pkgs/development/python-modules/publicsuffix2/default.nix
@@ -1,26 +1,28 @@
-{ lib, buildPythonPackage, fetchFromGitHub, requests }:
+{ lib, buildPythonPackage, fetchFromGitHub }:
 
 buildPythonPackage rec {
   pname = "publicsuffix2";
-  version = "2.20191221";
+  version = "2.2019-12-21";
 
-  # Tests are missing in the sdist
-  # See: https://github.com/nexB/python-publicsuffix2/issues/12
   src = fetchFromGitHub {
     owner = "nexB";
     repo = "python-publicsuffix2";
-    rev = "release-2.2019-12-21";
+    rev = "release-${version}";
     sha256 = "1dkvfvl0izq9hqzilnw8ipkbgjs9xyad9p21i3864hzinbh0wp9r";
   };
 
-  nativeBuildInputs = [ requests ];
+  postPatch = ''
+    # only used to update the interal publicsuffix list
+    substituteInPlace setup.py \
+      --replace "'requests >= 2.7.0'," ""
+  '';
+
+  pythonImportsCheck = [ "publicsuffix2" ];
 
   meta = with lib; {
-    description = ''
-      Get a public suffix for a domain name using the Public Suffix
-      List. Forked from and using the same API as the publicsuffix package.
-    '';
-    homepage = "https://pypi.python.org/pypi/publicsuffix2/";
+    description = "Get a public suffix for a domain name using the Public Suffix List";
+    homepage = "https://github.com/nexB/python-publicsuffix2";
     license = licenses.mpl20;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/zstandard/default.nix b/pkgs/development/python-modules/zstandard/default.nix
index 856ca0ee02499..5c0536166aab5 100755
--- a/pkgs/development/python-modules/zstandard/default.nix
+++ b/pkgs/development/python-modules/zstandard/default.nix
@@ -3,27 +3,41 @@
 , fetchPypi
 , cffi
 , hypothesis
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "zstandard";
   version = "0.17.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "fa9194cb91441df7242aa3ddc4cb184be38876cb10dd973674887f334bafbfb6";
   };
 
-  propagatedNativeBuildInputs = [ cffi ];
+  propagatedNativeBuildInputs = [
+    cffi
+  ];
+
+  propagatedBuildInputs = [
+    cffi
+  ];
 
-  propagatedBuildInputs = [ cffi ];
+  checkInputs = [
+    hypothesis
+  ];
 
-  checkInputs = [ hypothesis ];
+  pythonImportsCheck = [
+    "zstandard"
+  ];
 
   meta = with lib; {
     description = "zstandard bindings for Python";
     homepage = "https://github.com/indygreg/python-zstandard";
     license = licenses.bsdOriginal;
-    maintainers = [ maintainers.arnoldfarkas ];
+    maintainers = with maintainers; [ arnoldfarkas ];
   };
 }