summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-08-23 00:02:21 +0000
committerGitHub <noreply@github.com>2022-08-23 00:02:21 +0000
commit6f3dcdff1bb551b99cfc4100c190ea2fdf44c8b1 (patch)
tree0d245664bd57dae698786b1dff87b612d7523c71 /pkgs/development/python-modules
parent9968240f42ebcb3b70f7e16108b1c113df698e3c (diff)
parentf36ab16d7abaf7bda5ead040bf7c1897e546b881 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/aioesphomeapi/default.nix4
-rw-r--r--pkgs/development/python-modules/allure-python-commons-test/default.nix4
-rw-r--r--pkgs/development/python-modules/folium/default.nix9
-rw-r--r--pkgs/development/python-modules/gigalixir/default.nix4
-rw-r--r--pkgs/development/python-modules/ipympl/default.nix4
-rw-r--r--pkgs/development/python-modules/libvirt/default.nix4
-rwxr-xr-xpkgs/development/python-modules/osmnx/default.nix4
-rw-r--r--pkgs/development/python-modules/psycopg/default.nix134
-rw-r--r--pkgs/development/python-modules/sphinxcontrib-bibtex/default.nix4
9 files changed, 128 insertions, 43 deletions
diff --git a/pkgs/development/python-modules/aioesphomeapi/default.nix b/pkgs/development/python-modules/aioesphomeapi/default.nix
index 5afbf32310c7..67decf5ced07 100644
--- a/pkgs/development/python-modules/aioesphomeapi/default.nix
+++ b/pkgs/development/python-modules/aioesphomeapi/default.nix
@@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "aioesphomeapi";
- version = "10.11.0";
+ version = "10.13.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "esphome";
repo = pname;
rev = "refs/tags/v${version}";
- sha256 = "sha256-Wb46t+bdXGDYKzMr73YNWw1ULSLEV1xFcK16jHITnRg=";
+ sha256 = "sha256-ZaNrSkRH9pFhzZncCs37k1M0w5svPfrY0WxePUnUlms=";
};
propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/allure-python-commons-test/default.nix b/pkgs/development/python-modules/allure-python-commons-test/default.nix
index 3c43e698b8e7..9ff8d8610da2 100644
--- a/pkgs/development/python-modules/allure-python-commons-test/default.nix
+++ b/pkgs/development/python-modules/allure-python-commons-test/default.nix
@@ -12,13 +12,13 @@
buildPythonPackage rec {
pname = "allure-python-commons-test";
- version = "2.9.45";
+ version = "2.10.0";
disabled = pythonOlder "3.4";
src = fetchPypi {
inherit pname version;
- sha256 = "0rn8ccxxrm27skv3avdiw56zc4fk2h7nrk3jamqmx6fnvmshiz5f";
+ sha256 = "sha256-wSISmLO1qE91tO0svQ+Dau35wP8h9hMfFtW5STGX5dg=";
};
nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/folium/default.nix b/pkgs/development/python-modules/folium/default.nix
index 48b98a8e1018..9b8f3c080bae 100644
--- a/pkgs/development/python-modules/folium/default.nix
+++ b/pkgs/development/python-modules/folium/default.nix
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
+, fetchpatch
, pythonOlder
, pytestCheckHook
, branca
@@ -27,6 +28,14 @@ buildPythonPackage rec {
sha256 = "sha256-4UseN/3ojZdDUopwZLpHZEBon1qDDvCWfdzxodi/BeA=";
};
+ patches = [
+ # Fix test failures with latest branca
+ (fetchpatch {
+ url = "https://github.com/python-visualization/folium/commit/b410ab21cc46ec6756c2f755e5e81dcdca029c53.patch";
+ hash = "sha256-SVN4wKEep+VnAKnkJTf59rhnzHnbk6dV9XL5ntv4bog=";
+ })
+ ];
+
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/gigalixir/default.nix b/pkgs/development/python-modules/gigalixir/default.nix
index ab05ccfc3b30..c32c98fb3dd2 100644
--- a/pkgs/development/python-modules/gigalixir/default.nix
+++ b/pkgs/development/python-modules/gigalixir/default.nix
@@ -18,14 +18,14 @@
buildPythonApplication rec {
pname = "gigalixir";
- version = "1.2.6";
+ version = "1.3.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
- hash = "sha256-a2kU5vUSiOg0yFvGLxE2Edgyrar7psBD4NPEmDsP3IY=";
+ hash = "sha256-kNtybgv8j7t1tl6R5ZuC4vj5fnEcEenuNt0twA1kAh0=";
};
propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/ipympl/default.nix b/pkgs/development/python-modules/ipympl/default.nix
index d17a4a85c3bc..b15bb53e2c29 100644
--- a/pkgs/development/python-modules/ipympl/default.nix
+++ b/pkgs/development/python-modules/ipympl/default.nix
@@ -8,12 +8,12 @@
buildPythonPackage rec {
pname = "ipympl";
- version = "0.9.1";
+ version = "0.9.2";
format = "wheel";
src = fetchPypi {
inherit pname version format;
- sha256 = "sha256-NQW0ctQSF4/RFeJVdk0efnYy1sgunebWKyVDijU3RoA=";
+ sha256 = "sha256-ZVYE8L9tJkz1mXZpUKWybiktEHzCPhl1A2R+dUF5gcw=";
};
diff --git a/pkgs/development/python-modules/libvirt/default.nix b/pkgs/development/python-modules/libvirt/default.nix
index c24a27e7d300..34909a2741a8 100644
--- a/pkgs/development/python-modules/libvirt/default.nix
+++ b/pkgs/development/python-modules/libvirt/default.nix
@@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "libvirt";
- version = "8.5.0";
+ version = "8.6.0";
src = fetchFromGitLab {
owner = "libvirt";
repo = "libvirt-python";
rev = "v${version}";
- sha256 = "sha256-/OS+qBo0h9jshKDuxKX++cRPAjegImQROb7Uh+imOUA=";
+ sha256 = "sha256-eJ0RPxJ4Gm+VGs6NeTWP2FbvDnJy4mURPlFbgvkSgo0=";
};
nativeBuildInputs = [ pkg-config ];
diff --git a/pkgs/development/python-modules/osmnx/default.nix b/pkgs/development/python-modules/osmnx/default.nix
index 4442d2ddee01..9f26c06eaf3a 100755
--- a/pkgs/development/python-modules/osmnx/default.nix
+++ b/pkgs/development/python-modules/osmnx/default.nix
@@ -3,14 +3,14 @@
buildPythonPackage rec {
pname = "osmnx";
- version = "1.2.0";
+ version = "1.2.2";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "gboeing";
repo = pname;
rev = "v${version}";
- sha256 = "sha256-HfgMmPEiKstMXV0rtul8QLxB1FY32Ws7IEonBB+qZOc=";
+ sha256 = "sha256-+dUv1QrUmCIOCyUyjYX1kJtZrPuSp3t9xz/sRV7ppgA=";
};
propagatedBuildInputs = [ geopandas matplotlib networkx numpy pandas requests Rtree shapely folium scikit-learn scipy gdal rasterio ];
diff --git a/pkgs/development/python-modules/psycopg/default.nix b/pkgs/development/python-modules/psycopg/default.nix
index 6c80ab10f745..f2398238b28e 100644
--- a/pkgs/development/python-modules/psycopg/default.nix
+++ b/pkgs/development/python-modules/psycopg/default.nix
@@ -6,13 +6,17 @@
, pythonOlder
, substituteAll
-# links (libpq)
+# build
, postgresql
+, setuptools
# propagates
, backports-zoneinfo
, typing-extensions
+# psycopg-c
+, cython_3
+
# docs
, furo
, shapely
@@ -29,13 +33,6 @@
let
pname = "psycopg";
version = "3.0.16";
-in
-
-buildPythonPackage {
- inherit pname version;
- format = "pyproject";
-
- disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "psycopg";
@@ -44,6 +41,80 @@ buildPythonPackage {
hash = "sha256-jKhpmCcDi7FyMSpn51eSukFvmu3yacNovmRYG9jnu3g=";
};
+ patches = [
+ (substituteAll {
+ src = ./libpq.patch;
+ libpq = "${postgresql.lib}/lib/libpq${stdenv.hostPlatform.extensions.sharedLibrary}";
+ })
+ ];
+
+ baseMeta = {
+ changelog = "https://github.com/psycopg/psycopg/blob/master/docs/news.rst";
+ homepage = "https://github.com/psycopg/psycopg";
+ license = lib.licenses.lgpl3Plus;
+ maintainers = with lib.maintainers; [ hexa ];
+ };
+
+ psycopg-c = buildPythonPackage {
+ pname = "${pname}-c";
+ inherit version src;
+ format = "pyproject";
+
+ # apply patches to base repo
+ inherit patches;
+
+ # move into source root after patching
+ postPatch = ''
+ cd psycopg_c
+ '';
+
+ nativeBuildInputs = [
+ setuptools
+ cython_3
+ postgresql
+ ];
+
+ # tested in psycopg
+ doCheck = false;
+
+ meta = baseMeta // {
+ description = "C optimisation distribution for Psycopg";
+ };
+ };
+
+ psycopg-pool = buildPythonPackage {
+ pname = "${pname}-pool";
+ inherit version src;
+ format = "setuptools";
+
+ # apply patches to base repo
+ inherit patches;
+
+ # move into source root after patching
+ postPatch = ''
+ cd psycopg_pool
+ '';
+
+ propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
+ typing-extensions
+ ];
+
+ # tested in psycopg
+ doCheck = false;
+
+ meta = baseMeta // {
+ description = "Connection Pool for Psycopg";
+ };
+ };
+
+in
+
+buildPythonPackage rec {
+ inherit pname version src;
+ format = "pyproject";
+
+ disabled = pythonOlder "3.7";
+
outputs = [
"out"
"doc"
@@ -57,26 +128,24 @@ buildPythonPackage {
hash = "sha256-yn09fR9+7zQni8SvTG7BUmYRD7MK7u2arVAznWz2oAw=";
};
- patches = [
- (substituteAll {
- src = ./libpq.patch;
- libpq = "${postgresql.lib}/lib/libpq${stdenv.hostPlatform.extensions.sharedLibrary}";
- })
- ];
+ inherit patches;
# only move to sourceRoot after patching, makes patching easier
postPatch = ''
- cd ${pname}
+ cd psycopg
'';
nativeBuildInputs = [
furo
+ setuptools
shapely
- sphinxHook
sphinx-autodoc-typehints
+ sphinxHook
];
- propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [
+ propagatedBuildInputs = [
+ psycopg-c
+ ] ++ lib.optionals (pythonOlder "3.11") [
typing-extensions
] ++ lib.optionals (pythonOlder "3.9") [
backports-zoneinfo
@@ -84,12 +153,13 @@ buildPythonPackage {
pythonImportsCheck = [
"psycopg"
+ "psycopg_c"
+ "psycopg_pool"
];
passthru.optional-dependencies = {
- # TODO: package remaining variants
- #c = [ psycopg-c ];
- #pool = [ psycopg-pool ];
+ c = [ psycopg-c ];
+ pool = [ psycopg-pool ];
};
preCheck = ''
@@ -102,16 +172,21 @@ buildPythonPackage {
pytest-randomly
pytestCheckHook
postgresql
- ];
+ ]
+ ++ passthru.optional-dependencies.c
+ ++ passthru.optional-dependencies.pool;
disabledTests = [
- # linters shouldn't be run in checks
+ # don't depend on mypy for tests
"test_version"
+ "test_package_version"
+ ] ++ lib.optionals (stdenv.isDarwin) [
+ # racy test
+ "test_sched"
+ "test_sched_error"
];
disabledTestPaths = [
- # TODO: requires the pooled variant
- "tests/pool/"
# Network access
"tests/test_dns.py"
"tests/test_dns_srv.py"
@@ -127,11 +202,12 @@ buildPythonPackage {
cd ${pname}
'';
- meta = with lib; {
- changelog = "https://github.com/psycopg/psycopg/blob/master/docs/news.rst";
+ passthru = {
+ c = psycopg-c;
+ pool = psycopg-pool;
+ };
+
+ meta = baseMeta // {
description = "PostgreSQL database adapter for Python";
- homepage = "https://github.com/psycopg/psycopg";
- license = licenses.lgpl3Plus;
- maintainers = with maintainers; [ hexa ];
};
}
diff --git a/pkgs/development/python-modules/sphinxcontrib-bibtex/default.nix b/pkgs/development/python-modules/sphinxcontrib-bibtex/default.nix
index 94c545a694ef..d38d0df97362 100644
--- a/pkgs/development/python-modules/sphinxcontrib-bibtex/default.nix
+++ b/pkgs/development/python-modules/sphinxcontrib-bibtex/default.nix
@@ -10,13 +10,13 @@
buildPythonPackage rec {
pname = "sphinxcontrib-bibtex";
- version = "2.4.2";
+ version = "2.5.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
- hash = "sha256-ZbAj7kfzXx8DrE1xyCTmfGJMfsrBuyboNiMnGgH52oY=";
+ hash = "sha256-cbQuXbDi4oTyQ4dTJr+ZNqqadjKCJ311BIgm/vWwDqo=";
};
propagatedBuildInputs = [