From ea8f426860fd7eb21d57cdfb3e181c1fcb684193 Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Thu, 9 Oct 2025 10:22:55 +0800 Subject: [PATCH] pytomlpp: remove setup_requires to avoid setuptools fetching deps in Nix --- .../pytomlpp/0001-remove-setup_requires.patch | 24 +++++++++++++++++++ .../python-modules/pytomlpp/default.nix | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/python-modules/pytomlpp/0001-remove-setup_requires.patch diff --git a/pkgs/development/python-modules/pytomlpp/0001-remove-setup_requires.patch b/pkgs/development/python-modules/pytomlpp/0001-remove-setup_requires.patch new file mode 100644 index 000000000000..664648e83d91 --- /dev/null +++ b/pkgs/development/python-modules/pytomlpp/0001-remove-setup_requires.patch @@ -0,0 +1,24 @@ +From 8479bb8809a318f49ae5b881b65890db40b0e693 Mon Sep 17 00:00:00 2001 +From: loner <2788892716@qq.com> +Date: Thu, 9 Oct 2025 10:18:44 +0800 +Subject: [PATCH] Remove deprecated setup_requires from setup.cfg + +--- + setup.cfg | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/setup.cfg b/setup.cfg +index 78468c0..7a875bb 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -27,8 +27,6 @@ classifiers = + keywords = toml, parser, serilization, deserialization, serdes + + [options] +-setup_requires = +- pybind11~=2.10 + zip_safe = false + packages = find: + package_dir = =src +-- +2.51.0 diff --git a/pkgs/development/python-modules/pytomlpp/default.nix b/pkgs/development/python-modules/pytomlpp/default.nix index e705241e3a08..ba70ab2f78ae 100644 --- a/pkgs/development/python-modules/pytomlpp/default.nix +++ b/pkgs/development/python-modules/pytomlpp/default.nix @@ -25,6 +25,9 @@ buildPythonPackage rec { hash = "sha256-P41jEs1ShpiuSenreE4ykesY2wgBaR7TUKuv3tcD5J0="; }; + # The latest setuptools has deprecated `setup_requires` and will attempt to automatically invoke `pip` to install dependencies during the build. + patches = [ ./0001-remove-setup_requires.patch ]; + buildInputs = [ pybind11 ]; nativeCheckInputs = [