summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/aioelectricitymaps/default.nix55
-rw-r--r--pkgs/development/python-modules/async-upnp-client/default.nix4
-rw-r--r--pkgs/development/python-modules/cantools/default.nix58
-rw-r--r--pkgs/development/python-modules/duckdb/default.nix16
-rw-r--r--pkgs/development/python-modules/duckdb/setup.patch30
-rw-r--r--pkgs/development/python-modules/peaqevcore/default.nix4
-rw-r--r--pkgs/development/python-modules/pyduotecno/default.nix4
-rw-r--r--pkgs/development/python-modules/python-myq/default.nix (renamed from pkgs/development/python-modules/pymyq/default.nix)2
-rw-r--r--pkgs/development/python-modules/readmdict/default.nix50
-rw-r--r--pkgs/development/python-modules/textparser/default.nix39
-rw-r--r--pkgs/development/python-modules/toonapi/default.nix16
11 files changed, 261 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/aioelectricitymaps/default.nix b/pkgs/development/python-modules/aioelectricitymaps/default.nix
new file mode 100644
index 00000000000..502363de13c
--- /dev/null
+++ b/pkgs/development/python-modules/aioelectricitymaps/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, aiohttp
+, aresponses
+, buildPythonPackage
+, dataclasses-json
+, fetchFromGitHub
+, poetry-core
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+, syrupy
+}:
+
+buildPythonPackage rec {
+  pname = "aioelectricitymaps";
+  version = "0.1.3";
+  pyproject = true;
+
+  disabled = pythonOlder "3.10";
+
+  src = fetchFromGitHub {
+    owner = "jpbede";
+    repo = "aioelectricitymaps";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-2Ou3obpGRJ/iUPuaoBGlmDTJLx6+S8ivK9PbrbSvYyg=";
+  };
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    aiohttp
+    dataclasses-json
+  ];
+
+  nativeCheckInputs = [
+    aresponses
+    pytest-asyncio
+    pytestCheckHook
+    syrupy
+  ];
+
+  pythonImportsCheck = [
+    "aioelectricitymaps"
+  ];
+
+  meta = with lib; {
+    description = "Module for interacting with Electricity maps";
+    homepage = "https://github.com/jpbede/aioelectricitymaps";
+    changelog = "https://github.com/jpbede/aioelectricitymaps/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/async-upnp-client/default.nix b/pkgs/development/python-modules/async-upnp-client/default.nix
index 03b7e8664c4..c51c99d00f0 100644
--- a/pkgs/development/python-modules/async-upnp-client/default.nix
+++ b/pkgs/development/python-modules/async-upnp-client/default.nix
@@ -15,7 +15,7 @@
 
 buildPythonPackage rec {
   pname = "async-upnp-client";
-  version = "0.36.1";
+  version = "0.36.2";
   format = "setuptools";
 
   disabled = pythonOlder "3.8";
@@ -24,7 +24,7 @@ buildPythonPackage rec {
     owner = "StevenLooman";
     repo = "async_upnp_client";
     rev = "refs/tags/${version}";
-    hash = "sha256-NFSJlBRVgeuhK7IXjNz2g6SbSgveSjaJpSQrxSACG04=";
+    hash = "sha256-f3x5adxLHT/C5dXfdBH6stKv0y2nuhbpe8jkJex1DKU=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/cantools/default.nix b/pkgs/development/python-modules/cantools/default.nix
new file mode 100644
index 00000000000..3cb260dd8d1
--- /dev/null
+++ b/pkgs/development/python-modules/cantools/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools-scm
+, argparse-addons
+, bitstruct
+, can
+, crccheck
+, diskcache
+, matplotlib
+, parameterized
+, pytestCheckHook
+, pythonOlder
+, textparser
+}:
+
+buildPythonPackage rec {
+  pname = "cantools";
+  version = "38.0.2";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-k7/m9L1lLzaXY+qRYrAnpi9CSoQA8kI9QRN5GM5oxo4=";
+  };
+
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = [
+    argparse-addons
+    bitstruct
+    can
+    crccheck
+    diskcache
+    matplotlib
+    textparser
+  ];
+
+  nativeCheckInputs = [
+    parameterized
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "cantools"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/cantools/cantools";
+    description = "CAN bus tools.";
+    license = licenses.mit;
+    maintainers = with maintainers; [ gray-heron ];
+  };
+}
diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix
index e9aac74d835..5ff99568499 100644
--- a/pkgs/development/python-modules/duckdb/default.nix
+++ b/pkgs/development/python-modules/duckdb/default.nix
@@ -13,17 +13,19 @@
 }:
 
 buildPythonPackage rec {
-  inherit (duckdb) pname version src patches;
+  inherit (duckdb) pname version src;
   format = "setuptools";
 
-  postPatch = ''
+  # 1. let nix control build cores
+  # 2. default to extension autoload & autoinstall disabled
+  # 3. unconstrain setuptools_scm version
+  patches = (duckdb.patches or []) ++ [ ./setup.patch ];
+
+  postPatch = (duckdb.postPatch or "") + ''
     # we can't use sourceRoot otherwise patches don't apply, because the patches apply to the C++ library
     cd tools/pythonpkg
 
-    # 1. let nix control build cores
-    # 2. unconstrain setuptools_scm version
-    substituteInPlace setup.py \
-      --replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES"
+    substituteInPlace setup.py --subst-var NIX_BUILD_CORES
 
     # avoid dependency on mypy
     rm tests/stubs/test_stubs.py
@@ -54,6 +56,8 @@ buildPythonPackage rec {
   disabledTests = [
     # tries to make http request
     "test_install_non_existent_extension"
+    # test is racy and interrupt can be delivered before or after target point
+    "test_connection_interrupt"
   ];
 
   preCheck = ''
diff --git a/pkgs/development/python-modules/duckdb/setup.patch b/pkgs/development/python-modules/duckdb/setup.patch
new file mode 100644
index 00000000000..8c8f790a66a
--- /dev/null
+++ b/pkgs/development/python-modules/duckdb/setup.patch
@@ -0,0 +1,30 @@
+diff --git a/tools/pythonpkg/setup.py b/tools/pythonpkg/setup.py
+index 30f1e1ccdd..6784169fcb 100644
+--- a/tools/pythonpkg/setup.py
++++ b/tools/pythonpkg/setup.py
+@@ -96,7 +96,7 @@ def parallel_cpp_compile(
+             return
+         self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
+ 
+-    list(multiprocessing.pool.ThreadPool(multiprocessing.cpu_count()).imap(_single_compile, objects))
++    list(multiprocessing.pool.ThreadPool(@NIX_BUILD_CORES@).imap(_single_compile, objects))
+     return objects
+ 
+ 
+@@ -163,7 +163,6 @@ if 'BUILD_HTTPFS' in os.environ:
+ for ext in extensions:
+     toolchain_args.extend(['-DDUCKDB_EXTENSION_{}_LINKED'.format(ext.upper())])
+ 
+-toolchain_args.extend(['-DDUCKDB_EXTENSION_AUTOLOAD_DEFAULT=1', '-DDUCKDB_EXTENSION_AUTOINSTALL_DEFAULT=1'])
+ 
+ 
+ class get_pybind_include(object):
+@@ -348,7 +347,7 @@ setup(
+     packages=packages,
+     include_package_data=True,
+     python_requires='>=3.7.0',
+-    setup_requires=setup_requires + ["setuptools_scm<7.0.0", 'pybind11>=2.6.0'],
++    setup_requires=setup_requires + ["setuptools_scm", 'pybind11>=2.6.0'],
+     use_scm_version=setuptools_scm_conf,
+     tests_require=['google-cloud-storage', 'mypy', 'pytest'],
+     classifiers=[
diff --git a/pkgs/development/python-modules/peaqevcore/default.nix b/pkgs/development/python-modules/peaqevcore/default.nix
index 38397535c01..33e65661f92 100644
--- a/pkgs/development/python-modules/peaqevcore/default.nix
+++ b/pkgs/development/python-modules/peaqevcore/default.nix
@@ -6,14 +6,14 @@
 
 buildPythonPackage rec {
   pname = "peaqevcore";
-  version = "19.5.4";
+  version = "19.5.5";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-AkVUYUZobQsnSfMfciiSbPwo0HCnlO3NLoUA1+wqBt4=";
+    hash = "sha256-AgJT/VfNHcSuJhypBwqJkgXuvYDBlZ7eQp4nGva4z6U=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/pyduotecno/default.nix b/pkgs/development/python-modules/pyduotecno/default.nix
index e61e725a80a..17fd2d78885 100644
--- a/pkgs/development/python-modules/pyduotecno/default.nix
+++ b/pkgs/development/python-modules/pyduotecno/default.nix
@@ -8,7 +8,7 @@
 
 buildPythonPackage rec {
   pname = "pyduotecno";
-  version = "2023.10.0";
+  version = "2023.10.1";
   format = "pyproject";
 
   disabled = pythonOlder "3.9";
@@ -17,7 +17,7 @@ buildPythonPackage rec {
     owner = "Cereal2nd";
     repo = "pyDuotecno";
     rev = "refs/tags/${version}";
-    hash = "sha256-GxCqWgw4OdhJUMsGzCZnl6KYH7HQpGyV7zXMxbShHlg=";
+    hash = "sha256-fDooQb1i9rgzDZBzZ+lYb0WUYC8JNPEYk5DJ9wtS2Dg=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/pymyq/default.nix b/pkgs/development/python-modules/python-myq/default.nix
index 91c691f843a..f596828e6f9 100644
--- a/pkgs/development/python-modules/pymyq/default.nix
+++ b/pkgs/development/python-modules/python-myq/default.nix
@@ -9,7 +9,7 @@
 }:
 
 buildPythonPackage rec {
-  pname = "pymyq";
+  pname = "python-myq";
   version = "3.1.13";
   pyproject = true;
 
diff --git a/pkgs/development/python-modules/readmdict/default.nix b/pkgs/development/python-modules/readmdict/default.nix
new file mode 100644
index 00000000000..b7d61f8c8f5
--- /dev/null
+++ b/pkgs/development/python-modules/readmdict/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+
+, poetry-core
+, python-lzo
+, tkinter
+
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "readmdict";
+  version = "0.1.1";
+  pyproject = true;
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "ffreemt";
+    repo = "readmdict";
+    rev = "v${version}";
+    hash = "sha256-1/f+o2bVscT3EA8XQyS2hWjhimLRzfIBM6u2O7UqwcA=";
+  };
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    python-lzo
+    tkinter
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "readmdict"
+  ];
+
+  meta = with lib; {
+    description = "Read mdx/mdd files (repacking of readmdict from mdict-analysis)";
+    homepage = "https://github.com/ffreemt/readmdict";
+    license = licenses.mit;
+    maintainers = with maintainers; [ paveloom ];
+  };
+}
diff --git a/pkgs/development/python-modules/textparser/default.nix b/pkgs/development/python-modules/textparser/default.nix
new file mode 100644
index 00000000000..86c436ac21f
--- /dev/null
+++ b/pkgs/development/python-modules/textparser/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools-scm
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "textparser";
+  version = "0.24.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-VvcI51qp0AKtt22CO6bvFm1+zsHj5MpMHKED+BdWgzU=";
+  };
+
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "textparser"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/eerimoq/textparser";
+    description = "A text parser";
+    license = licenses.mit;
+    maintainers = with maintainers; [ gray-heron ];
+  };
+}
diff --git a/pkgs/development/python-modules/toonapi/default.nix b/pkgs/development/python-modules/toonapi/default.nix
index 8df8fa89a2c..ac51cae1c80 100644
--- a/pkgs/development/python-modules/toonapi/default.nix
+++ b/pkgs/development/python-modules/toonapi/default.nix
@@ -3,18 +3,22 @@
 , backoff
 , buildPythonPackage
 , fetchFromGitHub
+, pythonOlder
 , yarl
 }:
 
 buildPythonPackage rec {
   pname = "toonapi";
-  version = "0.2.1";
+  version = "0.3.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "frenck";
     repo = "python-toonapi";
-    rev = "v${version}";
-    sha256 = "10jh6p0ww51cb9f8amd9jq3lmvby6n2k08qwcr2n8ijbbgyp0ibf";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-RaN9ppqJbTik1/vNX0/YLoBawrqjyQWU6+FLTspIxug=";
   };
 
   propagatedBuildInputs = [
@@ -25,11 +29,15 @@ buildPythonPackage rec {
 
   # Project has no tests
   doCheck = false;
-  pythonImportsCheck = [ "toonapi" ];
+
+  pythonImportsCheck = [
+    "toonapi"
+  ];
 
   meta = with lib; {
     description = "Python client for the Quby ToonAPI";
     homepage = "https://github.com/frenck/python-toonapi";
+    changelog = "https://github.com/frenck/python-toonapi/releases/tag/v${version}";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ fab ];
   };