summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authornixpkgs-ci[bot] <190413589+nixpkgs-ci[bot]@users.noreply.github.com>2025-10-26 00:17:57 +0000
committerGitHub <noreply@github.com>2025-10-26 00:17:57 +0000
commit42e6bbbca3bb55db7f2cf8ef25f91aaa9a2d57f0 (patch)
treeab327693aba0e7fa3f9198779d03724296a1be80 /pkgs/development/python-modules
parent95edee5cb6a1af4090c9a3cafd979a2b4e87c208 (diff)
parente32661f795c4a156189fe911082cc1892ea04091 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/fmpy/default.nix149
-rw-r--r--pkgs/development/python-modules/gilknocker/default.nix6
-rw-r--r--pkgs/development/python-modules/pycync/default.nix49
-rw-r--r--pkgs/development/python-modules/pydroplet/default.nix43
-rw-r--r--pkgs/development/python-modules/scalene/default.nix6
-rw-r--r--pkgs/development/python-modules/setuptools-dso/default.nix30
-rw-r--r--pkgs/development/python-modules/tilequant/default.nix35
-rw-r--r--pkgs/development/python-modules/types-regex/default.nix4
-rw-r--r--pkgs/development/python-modules/victron-vrm/default.nix50
9 files changed, 270 insertions, 102 deletions
diff --git a/pkgs/development/python-modules/fmpy/default.nix b/pkgs/development/python-modules/fmpy/default.nix
index 9401238f13c6..e7e77cf891d3 100644
--- a/pkgs/development/python-modules/fmpy/default.nix
+++ b/pkgs/development/python-modules/fmpy/default.nix
@@ -1,45 +1,47 @@
{
lib,
stdenv,
- fetchurl,
buildPythonPackage,
fetchFromGitHub,
- pythonOlder,
+
+ # patches
+ qt6,
+ fmpy,
+ replaceVars,
+
+ # nativeBuildInputs
cmake,
- sundials,
- lapack,
+
+ # build-system
+ hatchling,
+
+ # dependencies
attrs,
+ jinja2,
lark,
lxml,
- rpclib,
msgpack,
+ nbformat,
numpy,
- scipy,
- pytz,
- dask,
- requests,
- matplotlib,
- pyqtgraph,
- notebook,
- plotly,
- hatchling,
pyside6,
- jinja2,
- flask,
- dash,
- dash-bootstrap-components,
- qt6,
- fmpy,
- runCommand,
- enableRemoting ? true,
+
+ # preBuild
+ rpclib,
+
+ # tests
versionCheckHook,
+
+ # passthru
+ sundials,
+ lapack,
+ runCommand,
fmi-reference-fmus,
- replaceVars,
+
+ enableRemoting ? true,
}:
buildPythonPackage rec {
pname = "fmpy";
- version = "0.3.23";
- disabled = pythonOlder "3.10";
+ version = "0.3.26";
pyproject = true;
# Bumping version? Make sure to look through the commit history for
@@ -47,47 +49,11 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "CATIA-Systems";
repo = "FMPy";
- rev = "v${version}";
+ tag = "v${version}";
fetchSubmodules = true;
- hash = "sha256-4jBYOymurGCbjT0WQjIRNsztwOXBYVTGLdc4kNSTOZw=";
+ hash = "sha256-NAaROHrZ8OPmj/3lWFk9hNrrlqsDbscGdDn6G7xfFeQ=";
};
- nativeBuildInputs = [
- cmake
- ];
-
- build-system = [
- hatchling
- ];
-
- dependencies = [
- pyqtgraph
- pyside6
- attrs
- lark
- lxml
- msgpack
- numpy
- scipy
- pytz
- dask
- requests
- matplotlib
- pyqtgraph
- notebook
- plotly
- rpclib
- fmpy.passthru.cvode
- pyside6
- jinja2
- flask
- dash
- dash-bootstrap-components
- ];
-
- dontUseCmakeConfigure = true;
- dontUseCmakeBuildDir = true;
-
patches = [
(replaceVars ./0001-gui-override-Qt6-libexec-path.patch {
qt6libexec = "${qt6.qtbase}/libexec/";
@@ -106,9 +72,33 @@ buildPythonPackage rec {
# Make forced includes of other systems' artifacts optional in order
# to pass build (otherwise vendored upstream from CI)
postPatch = ''
- sed --in-place 's/force-include/source/g' pyproject.toml
+ substituteInPlace pyproject.toml \
+ --replace-fail "force-include" "source"
'';
+ nativeBuildInputs = [
+ cmake
+ ];
+
+ build-system = [
+ hatchling
+ ];
+
+ dependencies = [
+ attrs
+ cmake
+ jinja2
+ lark
+ lxml
+ msgpack
+ nbformat
+ numpy
+ pyside6
+ ];
+
+ dontUseCmakeConfigure = true;
+ dontUseCmakeBuildDir = true;
+
# Don't run upstream build scripts as they are too specialized.
# cvode is already built, so we only need to build native binaries.
# We run these cmake builds and then run the standard
@@ -118,9 +108,10 @@ buildPythonPackage rec {
cmakeConfigurePhase
cmake --build native/src/build --config Release
''
+ # reimplementation of native/build_remoting.py
+ # 2025-10-25: fix cmake 4 compatibility
+ lib.optionalString (enableRemoting && stdenv.hostPlatform.isLinux) ''
- # reimplementation of native/build_remoting.py
- cmakeFlags="-S native/remoting -B remoting/linux64 -D RPCLIB=${rpclib}"
+ cmakeFlags="-S native/remoting -B remoting/linux64 -D RPCLIB=${rpclib} -D CMAKE_POLICY_VERSION_MINIMUM=3.10"
cmakeConfigurePhase
cmake --build remoting/linux64 --config Release
''
@@ -147,22 +138,33 @@ buildPythonPackage rec {
"fmpy.sundials"
];
- nativeInstallCheckInputs = [
+ nativeCheckInputs = [
versionCheckHook
];
+ versionCheckProgramArg = "--version";
passthru = {
# From sundials, build only the CVODE solver. C.f.
# src/native/build_cvode.py
cvode =
- (sundials.overrideAttrs (prev: {
+ (sundials.overrideAttrs (prev: rec {
# hash copied from native/build_cvode.py
version = "5.3.0";
- src = fetchurl {
- url = "https://github.com/LLNL/sundials/releases/download/v5.3.0/sundials-5.3.0.tar.gz";
- sha256 = "88dff7e11a366853d8afd5de05bf197a8129a804d9d4461fb64297f1ef89bca7";
+ src = fetchFromGitHub {
+ owner = "LLNL";
+ repo = "sundials";
+ tag = "v${version}";
+ hash = "sha256-8TvIGhrB9Rq9GgWqeyPTcYFrgn6Q79VkhkLuucNKlg0=";
};
+ # Fix CMake 4 compatibility
+ postPatch = ''
+ substituteInPlace config/SundialsPOSIXTimers.cmake \
+ --replace-fail \
+ "CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)" \
+ "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)"
+ '';
+
cmakeFlags =
prev.cmakeFlags
++ lib.mapAttrsToList (option: enable: lib.cmakeBool option enable) {
@@ -174,6 +176,8 @@ buildPythonPackage rec {
BUILD_IDA = false;
BUILD_IDAS = false;
BUILD_KINSOL = false;
+
+ BUILD_SHARED_LIBS = true;
};
# FMPy searches for sundials without the "lib"-prefix; strip it
@@ -205,7 +209,7 @@ buildPythonPackage rec {
for fmu in $(find ${fmi-reference-fmus}/*.fmu ! -name "Clocks.fmu"); do
name=$(basename $fmu)
echo "--- START $name ---"
- ${fmpy}/bin/fmpy simulate $fmu \
+ ${lib.getExe fmpy} simulate $fmu \
--fmi-logging \
--output-file $out/$name.csv \
| tee $out/$name.out
@@ -227,5 +231,6 @@ buildPythonPackage rec {
# builds. C.f.
# <https://github.com/CATIA-Systems/FMPy/blob/v0.3.23/pyproject.toml?plain=1#L71-L112>
platforms = lib.platforms.x86_64 ++ [ "i686-windows" ];
+ mainProgram = "fmpy";
};
}
diff --git a/pkgs/development/python-modules/gilknocker/default.nix b/pkgs/development/python-modules/gilknocker/default.nix
index fb6b432f3131..337242804af3 100644
--- a/pkgs/development/python-modules/gilknocker/default.nix
+++ b/pkgs/development/python-modules/gilknocker/default.nix
@@ -17,19 +17,19 @@
buildPythonPackage rec {
pname = "gilknocker";
- version = "0.4.1.post6";
+ version = "0.4.2";
pyproject = true;
src = fetchFromGitHub {
owner = "milesgranger";
repo = "gilknocker";
tag = "v${version}";
- hash = "sha256-jJOI7hlm6kcqfBbM56y5mKD+lJe0g+qAQpDF7ePM+GM=";
+ hash = "sha256-RFLThZRxAXqF/Yzjpmafn2dVavOGJrM9U258FfLej/I=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
- hash = "sha256-cUv0CT8d6Nxjzh/S/hY9jcpeFX/5KvBxSkqOkt4htyU=";
+ hash = "sha256-C3rxqmZMSc6SC8bU5VB61x8Xk/crD3o7Nr1xvzv7uqI=";
};
nativeBuildInputs =
diff --git a/pkgs/development/python-modules/pycync/default.nix b/pkgs/development/python-modules/pycync/default.nix
new file mode 100644
index 000000000000..62dcf3c65b36
--- /dev/null
+++ b/pkgs/development/python-modules/pycync/default.nix
@@ -0,0 +1,49 @@
+{
+ aiohttp,
+ buildPythonPackage,
+ fetchFromGitHub,
+ hatchling,
+ lib,
+ pytest-asyncio,
+ pytest-mock,
+ pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+ pname = "pycync";
+ version = "0.4.2";
+ pyproject = true;
+
+ src = fetchFromGitHub {
+ owner = "Kinachi249";
+ repo = "pycync";
+ tag = "v${version}";
+ hash = "sha256-PDCS+ucfO5RRvTshGGjxir3ez7L405k5tL5svMxZMsg=";
+ };
+
+ build-system = [ hatchling ];
+
+ dependencies = [
+ aiohttp
+ ];
+
+ pythonImportsCheck = [ "pycync" ];
+
+ nativeCheckInputs = [
+ pytest-asyncio
+ pytest-mock
+ pytestCheckHook
+ ];
+
+ preCheck = ''
+ cd tests
+ '';
+
+ meta = {
+ changelog = "https://github.com/Kinachi249/pycync/releases/tag/${src.tag}";
+ description = "Python API library for Cync smart devices";
+ homepage = "https://github.com/Kinachi249/pycync";
+ license = lib.licenses.gpl3Plus;
+ maintainers = [ lib.maintainers.dotlambda ];
+ };
+}
diff --git a/pkgs/development/python-modules/pydroplet/default.nix b/pkgs/development/python-modules/pydroplet/default.nix
new file mode 100644
index 000000000000..e31c9ab1f77e
--- /dev/null
+++ b/pkgs/development/python-modules/pydroplet/default.nix
@@ -0,0 +1,43 @@
+{
+ aiohttp,
+ buildPythonPackage,
+ fetchFromGitHub,
+ lib,
+ pytest-asyncio,
+ pytestCheckHook,
+ setuptools,
+}:
+
+buildPythonPackage rec {
+ pname = "pydroplet";
+ version = "2.3.4";
+ pyproject = true;
+
+ src = fetchFromGitHub {
+ owner = "Hydrific";
+ repo = "pydroplet";
+ tag = "v${version}";
+ hash = "sha256-cVftXG7sKDpGRRb2jLlFxgCH2+rA6hLYTUqWL1kvh+E=";
+ };
+
+ build-system = [ setuptools ];
+
+ dependencies = [
+ aiohttp
+ ];
+
+ pythonImportsCheck = [ "pydroplet" ];
+
+ nativeCheckInputs = [
+ pytest-asyncio
+ pytestCheckHook
+ ];
+
+ meta = {
+ changelog = "https://github.com/Hydrific/pydroplet/releases/tag/${src.tag}";
+ description = "Package to connect to a Droplet device";
+ homepage = "https://github.com/Hydrific/pydroplet";
+ license = lib.licenses.mit;
+ maintainers = [ lib.maintainers.dotlambda ];
+ };
+}
diff --git a/pkgs/development/python-modules/scalene/default.nix b/pkgs/development/python-modules/scalene/default.nix
index b33764932a98..a97bc531585e 100644
--- a/pkgs/development/python-modules/scalene/default.nix
+++ b/pkgs/development/python-modules/scalene/default.nix
@@ -38,7 +38,7 @@ in
buildPythonPackage rec {
pname = "scalene";
- version = "1.5.52";
+ version = "1.5.55";
pyproject = true;
disabled = pythonOlder "3.9";
@@ -46,7 +46,7 @@ buildPythonPackage rec {
owner = "plasma-umass";
repo = "scalene";
tag = "v${version}";
- hash = "sha256-8WE/tR0tGwdNSPtieS90QAOFlS66h/JxaV2LvpZjx2E=";
+ hash = "sha256-aO7l/paYqbneDArAbXxptIlMGfvc1dAaFLucEj/7xbk=";
};
patches = [
@@ -95,6 +95,8 @@ buildPythonPackage rec {
disabledTests = [
# Flaky -- socket collision
"test_show_browser"
+ # File not found
+ "test_nested_package_relative_import"
];
# remove scalene directory to prevent pytest import confusion
diff --git a/pkgs/development/python-modules/setuptools-dso/default.nix b/pkgs/development/python-modules/setuptools-dso/default.nix
index 62244825237e..5c33d1fd89b8 100644
--- a/pkgs/development/python-modules/setuptools-dso/default.nix
+++ b/pkgs/development/python-modules/setuptools-dso/default.nix
@@ -1,10 +1,15 @@
{
lib,
+ stdenv,
buildPythonPackage,
- fetchPypi,
+ fetchFromGitHub,
+
+ # build-system
+ setuptools,
+
+ # tests
nose2,
pytestCheckHook,
- setuptools,
}:
buildPythonPackage rec {
@@ -12,10 +17,11 @@ buildPythonPackage rec {
version = "2.12.2";
pyproject = true;
- src = fetchPypi {
- pname = "setuptools_dso";
- inherit version;
- hash = "sha256-evt2+T0Tzp2iRQJnbY8tTbw9o1xiRflfJ9+fp0RQeaQ=";
+ src = fetchFromGitHub {
+ owner = "epics-base";
+ repo = "setuptools_dso";
+ tag = version;
+ hash = "sha256-YYm3mTA443vcD/4vHa7EgPzvDDzBic64NWWJDQYQHKs=";
};
build-system = [ setuptools ];
@@ -25,10 +31,16 @@ buildPythonPackage rec {
pytestCheckHook
];
- meta = with lib; {
+ disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
+ # distutils.compilers.C.errors.CompileError: command '/nix/store/...-clang-wrapper-21.1.2/bin/clang' failed with exit code 1
+ # fatal error: 'string' file not found
+ "test_cxx"
+ ];
+
+ meta = {
description = "Setuptools extension for building non-Python Dynamic Shared Objects";
homepage = "https://github.com/mdavidsaver/setuptools_dso";
- license = licenses.bsd3;
- maintainers = with maintainers; [ marius851000 ];
+ license = lib.licenses.bsd3;
+ maintainers = with lib.maintainers; [ marius851000 ];
};
}
diff --git a/pkgs/development/python-modules/tilequant/default.nix b/pkgs/development/python-modules/tilequant/default.nix
index 0d5816150f96..15e879c0f5f4 100644
--- a/pkgs/development/python-modules/tilequant/default.nix
+++ b/pkgs/development/python-modules/tilequant/default.nix
@@ -1,13 +1,16 @@
{
lib,
buildPythonPackage,
+ fetchFromGitHub,
+
+ # build-system
+ setuptools,
+ setuptools-dso,
+
+ # dependencies
click,
- fetchPypi,
ordered-set,
pillow,
- pythonOlder,
- setuptools,
- setuptools-dso,
sortedcollections,
}:
@@ -16,19 +19,23 @@ buildPythonPackage rec {
version = "1.2.0";
pyproject = true;
- disabled = pythonOlder "3.9";
-
- src = fetchPypi {
- inherit pname version;
- hash = "sha256-0i7brL/hn8SOj3q/rpOcOQ9QW/4Mew2fr0Y42k4K9UI=";
+ src = fetchFromGitHub {
+ owner = "SkyTemple";
+ repo = "tilequant";
+ tag = version;
+ # Fetch tilequant source files
+ fetchSubmodules = true;
+ hash = "sha256-MgyKLwVdL2DRR8J88q7Q57rQiX4FTOlQ5rTY3UuhaJM=";
};
- pythonRelaxDeps = [ "pillow" ];
-
build-system = [
setuptools
+ setuptools-dso
];
+ pythonRelaxDeps = [
+ "click"
+ ];
dependencies = [
click
ordered-set
@@ -41,12 +48,12 @@ buildPythonPackage rec {
pythonImportsCheck = [ "tilequant" ];
- meta = with lib; {
+ meta = {
description = "Tool for quantizing image colors using tile-based palette restrictions";
homepage = "https://github.com/SkyTemple/tilequant";
changelog = "https://github.com/SkyTemple/tilequant/releases/tag/${version}";
- license = licenses.gpl3Plus;
- maintainers = with maintainers; [ marius851000 ];
+ license = lib.licenses.gpl3Plus;
+ maintainers = with lib.maintainers; [ marius851000 ];
mainProgram = "tilequant";
};
}
diff --git a/pkgs/development/python-modules/types-regex/default.nix b/pkgs/development/python-modules/types-regex/default.nix
index 669d7361fca4..13c18db616f3 100644
--- a/pkgs/development/python-modules/types-regex/default.nix
+++ b/pkgs/development/python-modules/types-regex/default.nix
@@ -7,13 +7,13 @@
buildPythonPackage rec {
pname = "types-regex";
- version = "2025.9.18.20250921";
+ version = "2025.10.23.20251023";
pyproject = true;
src = fetchPypi {
pname = "types_regex";
inherit version;
- hash = "sha256-4XAMIbHDEpDkpt1iWE7R8dadcE7RZ2toqO2i0dJCDD8=";
+ hash = "sha256-dfAjvwrwV+AVennpnmZpBTe+uzXZA9uPKbTlwtO+54I=";
};
build-system = [
diff --git a/pkgs/development/python-modules/victron-vrm/default.nix b/pkgs/development/python-modules/victron-vrm/default.nix
new file mode 100644
index 000000000000..fdb916295599
--- /dev/null
+++ b/pkgs/development/python-modules/victron-vrm/default.nix
@@ -0,0 +1,50 @@
+{
+ aiohttp,
+ buildPythonPackage,
+ fetchFromGitHub,
+ hatchling,
+ lib,
+ pydantic,
+ pytest-asyncio,
+ pytestCheckHook,
+ pytz,
+}:
+
+buildPythonPackage rec {
+ pname = "victron-vrm";
+ version = "0.1.8";
+ pyproject = true;
+
+ src = fetchFromGitHub {
+ owner = "KSoft-Si";
+ repo = "vrm-client";
+ tag = "v${version}";
+ hash = "sha256-NxkMUwiFD8C7Nrtd7cjoFvdkbAOJkIIt+TPtkous8Nc=";
+ };
+
+ build-system = [ hatchling ];
+
+ dependencies = [
+ aiohttp
+ pydantic
+ pytz
+ ];
+
+ pythonImportsCheck = [ "victron_vrm" ];
+
+ nativeCheckInputs = [
+ pytest-asyncio
+ pytestCheckHook
+ ];
+
+ # tests connect to vrmapi.victronenergy.com
+ doCheck = false;
+
+ meta = {
+ changelog = "https://github.com/KSoft-Si/vrm-client/releases/tag/${src.tag}";
+ description = "Async Python client for the Victron Energy VRM API";
+ homepage = "https://github.com/KSoft-Si/vrm-client";
+ license = lib.licenses.mit;
+ maintainers = [ lib.maintainers.dotlambda ];
+ };
+}