Python package not seeing another Python package

I have a python3.pkgs.buildPythonApplication derivation that specifies a bunch of python packages in propagatedBuildInputs,

  propagatedBuildInputs = with python3.pkgs; [
    # [others removed for brevity]
    cx_Freeze
    packaging
  ];

When the build gets to the pipInstallPhase, I get an error about cx_Freeze not finding packaging>=21.0,

Executing pipInstallPhase
/build/cx_Freeze-6.11.1/dist /build/cx_Freeze-6.11.1
Processing ./cx_Freeze-6.11.1-cp310-cp310-linux_x86_64.whl
ERROR: Could not find a version that satisfies the requirement packaging>=21.0 (from cx-freeze) (from versions: none)
ERROR: No matching distribution found for packaging>=21.0

Even though python3.pkgs.packaging.version is 21.3,

$ nix repl .
Welcome to Nix 2.8.1. Type :? for help.

Loading '.'...
Added 17165 variables.

nix-repl> :p python3.pkgs.packaging.version
"21.3"

How is this requirement not satisfied?

Full derivation: https://github.com/aidalgol/nixpkgs/blob/742318d8b1230004a94685beb5d0a596aa955d42/pkgs/applications/misc/meshroom/default.nix

Full nix log
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/7isqnggx2cpwrd2jlnw9rdrn1bmkdahs-cx_Freeze-6.11.1.tar.gz
source root is cx_Freeze-6.11.1
setting SOURCE_DATE_EPOCH to timestamp 1655871207 of file cx_Freeze-6.11.1/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
substituteStream(): WARNING: pattern 'os.stat(module.file).st_mtime' doesn't match anything in file 'cx_Freeze/freezer.py'
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing setuptoolsBuildPhase
/nix/store/1pxd3xyarxfr6bxrkz2px70j59pa4z04-python3.10-setuptools-63.2.0/lib/python3.10/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
  warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/module.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/parser.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/common.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/winversioninfo.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/finder.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/cli.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/exception.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/_compat.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/__main__.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/hooks.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/winmsvcr.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/sandbox.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/darwintools.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/freezer.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/dist.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/executable.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/setupwriter.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
copying cx_Freeze/__init__.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze
creating build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/build_exe.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/install_exe.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/build.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/__init__.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/bdist_mac.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/_pydialog.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/bdist_msi.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/install.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/bdist_rpm.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
copying cx_Freeze/command/_bdist_msi.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/command
creating build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts
copying cx_Freeze/initscripts/SharedLibSource.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts
copying cx_Freeze/initscripts/ConsoleSetLibPath.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts
copying cx_Freeze/initscripts/SharedLib.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts
copying cx_Freeze/initscripts/__startup__.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts
copying cx_Freeze/initscripts/Console.py -> build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts
running build_ext
running install_include
/nix/store/1pxd3xyarxfr6bxrkz2px70j59pa4z04-python3.10-setuptools-63.2.0/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/source
creating build/temp.linux-x86_64-cpython-310/source/bases
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/nix/store/c1vb2z3c64i0sd92iz7fv0lb720qcvhb-python3-3.10.6/include/python3.10 -c source/bases/Console.c -o build/temp.linux-x86_64-cpython-310/source/bases/Console.o
creating build/lib.linux-x86_64-cpython-310/cx_Freeze/bases
gcc build/temp.linux-x86_64-cpython-310/source/bases/Console.o -L/nix/store/c1vb2z3c64i0sd92iz7fv0lb720qcvhb-python3-3.10.6/lib/python3.10/config-3.10-x86_64-linux-gnu -L/nix/store/c1vb2z3c64i0sd92iz7fv0lb720qcvhb-python3-3.10.6/lib -lpython3.10 -o build/lib.linux-x86_64-cpython-310/cx_Freeze/bases/Console-cpython-310-x86_64-linux-gnu -Xlinker -export-dynamic -ldl -lcrypt -lm -lm -s -Wl,-rpath,$ORIGIN/lib -Wl,-rpath,$ORIGIN/../lib
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/__init__.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/dist.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/hooks.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/setupwriter.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
creating build/bdist.linux-x86_64/wheel/cx_Freeze/initscripts
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts/ConsoleSetLibPath.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/initscripts
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts/SharedLib.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/initscripts
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts/SharedLibSource.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/initscripts
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts/Console.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/initscripts
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/initscripts/__startup__.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/initscripts
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/executable.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/_compat.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/cli.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/darwintools.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/winmsvcr.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/exception.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
creating build/bdist.linux-x86_64/wheel/cx_Freeze/bases
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/bases/Console-cpython-310-x86_64-linux-gnu -> build/bdist.linux-x86_64/wheel/cx_Freeze/bases
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/common.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
creating build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/_pydialog.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/build.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/install.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/bdist_msi.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/__init__.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/bdist_rpm.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/install_exe.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/_bdist_msi.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/build_exe.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/command/bdist_mac.py -> build/bdist.linux-x86_64/wheel/cx_Freeze/command
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/finder.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/winversioninfo.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/__main__.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/sandbox.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/parser.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/module.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
copying build/lib.linux-x86_64-cpython-310/cx_Freeze/freezer.py -> build/bdist.linux-x86_64/wheel/cx_Freeze
writing byte-compilation script '/build/tmp_1oekh2l.py'
/nix/store/c1vb2z3c64i0sd92iz7fv0lb720qcvhb-python3-3.10.6/bin/python3.10 /build/tmp_1oekh2l.py
/build/tmp_1oekh2l.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import byte_compile
removing /build/tmp_1oekh2l.py
running install_egg_info
running egg_info
writing cx_Freeze.egg-info/PKG-INFO
writing dependency_links to cx_Freeze.egg-info/dependency_links.txt
writing entry points to cx_Freeze.egg-info/entry_points.txt
writing requirements to cx_Freeze.egg-info/requires.txt
writing top-level names to cx_Freeze.egg-info/top_level.txt
reading manifest file 'cx_Freeze.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'doc/src/license.rst'
writing manifest file 'cx_Freeze.egg-info/SOURCES.txt'
Copying cx_Freeze.egg-info to build/bdist.linux-x86_64/wheel/cx_Freeze-6.11.1-py3.10.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/cx_Freeze-6.11.1.dist-info/WHEEL
creating 'dist/cx_Freeze-6.11.1-cp310-cp310-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'cx_Freeze/__init__.py'
adding 'cx_Freeze/__main__.py'
adding 'cx_Freeze/_compat.py'
adding 'cx_Freeze/cli.py'
adding 'cx_Freeze/common.py'
adding 'cx_Freeze/darwintools.py'
adding 'cx_Freeze/dist.py'
adding 'cx_Freeze/exception.py'
adding 'cx_Freeze/executable.py'
adding 'cx_Freeze/finder.py'
adding 'cx_Freeze/freezer.py'
adding 'cx_Freeze/hooks.py'
adding 'cx_Freeze/module.py'
adding 'cx_Freeze/parser.py'
adding 'cx_Freeze/sandbox.py'
adding 'cx_Freeze/setupwriter.py'
adding 'cx_Freeze/winmsvcr.py'
adding 'cx_Freeze/winversioninfo.py'
adding 'cx_Freeze/__pycache__/__init__.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/__main__.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/_compat.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/cli.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/common.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/darwintools.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/dist.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/exception.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/executable.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/finder.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/freezer.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/hooks.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/module.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/parser.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/sandbox.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/setupwriter.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/winmsvcr.cpython-310.opt-1.pyc'
adding 'cx_Freeze/__pycache__/winversioninfo.cpython-310.opt-1.pyc'
adding 'cx_Freeze/bases/Console-cpython-310-x86_64-linux-gnu'
adding 'cx_Freeze/command/__init__.py'
adding 'cx_Freeze/command/_bdist_msi.py'
adding 'cx_Freeze/command/_pydialog.py'
adding 'cx_Freeze/command/bdist_mac.py'
adding 'cx_Freeze/command/bdist_msi.py'
adding 'cx_Freeze/command/bdist_rpm.py'
adding 'cx_Freeze/command/build.py'
adding 'cx_Freeze/command/build_exe.py'
adding 'cx_Freeze/command/install.py'
adding 'cx_Freeze/command/install_exe.py'
adding 'cx_Freeze/command/__pycache__/__init__.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/_bdist_msi.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/_pydialog.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/bdist_mac.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/bdist_msi.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/bdist_rpm.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/build.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/build_exe.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/install.cpython-310.opt-1.pyc'
adding 'cx_Freeze/command/__pycache__/install_exe.cpython-310.opt-1.pyc'
adding 'cx_Freeze/initscripts/Console.py'
adding 'cx_Freeze/initscripts/ConsoleSetLibPath.py'
adding 'cx_Freeze/initscripts/SharedLib.py'
adding 'cx_Freeze/initscripts/SharedLibSource.py'
adding 'cx_Freeze/initscripts/__startup__.py'
adding 'cx_Freeze/initscripts/__pycache__/Console.cpython-310.opt-1.pyc'
adding 'cx_Freeze/initscripts/__pycache__/ConsoleSetLibPath.cpython-310.opt-1.pyc'
adding 'cx_Freeze/initscripts/__pycache__/SharedLib.cpython-310.opt-1.pyc'
adding 'cx_Freeze/initscripts/__pycache__/SharedLibSource.cpython-310.opt-1.pyc'
adding 'cx_Freeze/initscripts/__pycache__/__startup__.cpython-310.opt-1.pyc'
adding 'cx_Freeze-6.11.1.dist-info/METADATA'
adding 'cx_Freeze-6.11.1.dist-info/WHEEL'
adding 'cx_Freeze-6.11.1.dist-info/entry_points.txt'
adding 'cx_Freeze-6.11.1.dist-info/license.rst'
adding 'cx_Freeze-6.11.1.dist-info/top_level.txt'
adding 'cx_Freeze-6.11.1.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Finished executing setuptoolsBuildPhase
buildPhase completed in 1 minutes 8 seconds
@nix { "action": "setPhase", "phase": "installPhase" }
installing
Executing pipInstallPhase
/build/cx_Freeze-6.11.1/dist /build/cx_Freeze-6.11.1
Processing ./cx_Freeze-6.11.1-cp310-cp310-linux_x86_64.whl
ERROR: Could not find a version that satisfies the requirement packaging>=21.0 (from cx-freeze) (from versions: none)
ERROR: No matching distribution found for packaging>=21.0

Probably answered here already ?

1 Like

That sounds like what’s going on. So how do I decide which packages should go into propagatedBuildInputs and which should go into the python3 instance?

I guess “specific” in this context just means your set of python packages.

Putting the derivation inside,

let
  pythonPackages = (python3.withPackages (pypkgs: with pypkgs; [
    packaging
    cx_Freeze
  ])).pkgs;
in

(changing the rest of the code to refer to pythonPackages of course) and it made no difference.

Yeah, I don’t think that’s the issue here, packaging is a built-in and therefore always included.

What does your full derivation look like?

Right now,

{ lib
, buildPythonApplication
, psutil
, pyside2
, markdown
, requests
, cx_Freeze
, pytest
, fetchFromGitHub
, alicevision
}:

buildPythonApplication rec {
  pname = "meshroom";
  version = "2021.1.0";

  src = fetchFromGitHub {
    owner = "alicevision";
    repo = "meshroom";
    rev = "v${version}";
    sha256 = "sha256-SCinoQMOVg3u8CeUHLCEMBqJtUKBEp/JLDfXIwHU1Ug=";
  };

  propagatedBuildInputs = [
    psutil
    pyside2
    markdown
    requests
    cx_Freeze
  ];

  buildInputs = [
    alicevision
  ];

  checkInputs = [ pytest ];

  meta = with lib; {
    description = "3D Reconstruction Software";
    homepage = "https://alicevision.org/";
    license = licenses.mpl20;
    platforms = [ "x86_64-linux" ];
    maintainers = with maintainers; [ aidalgol ];
  };
}

But after looking more closely at upstream’s setup.py, I think I need to override the buildPhase from scratch, because it is trying to build an executable to be packed into a tarball with some of its library dependency, including setting LD_LIBRARY_PATH (see setupInitScriptUnix.py), which is going to wreak havoc on Nix.

Do the dependency libraries really work like that? I didn’t think they were packaged at the top level, so they shouldn’t be getting pulled in by callPackage. It should just fail outright, so I doubt this will fix your issue, but perhaps try instead grabbing them from python3Packages?

My only other nudge is to try debugging using nix-shell or nix develop. It’ll be easier to figure out what exactly is missing if you have full access to the environment.

Ok, nevermind me, packaging is not a built-in. I’m wondering if because of the way you’re depending on the packages their dependencies are not being pulled in for the build (since you’re using an application version of the inputs or something). Worst case try also depending on packaging?

You are right that the python libraries are not top level. I am using python3Packages.callPackage.

meshroom = python3Packages.callPackage ../applications/graphics/meshroom { };

But I had previously been using the top-level callPackage and putting python3Packages in my derivation’s argument list. I have also tried depending on packaging, and it was not being seen. If I modified the cx_Freeze derivation to depend on packaging, then I got an error from cx_Freeze about the version of setuptools not satisfying its requirement.

ERROR: Could not find a version that satisfies the requirement setuptools<=60.10.0,>=59.0.1 (from cx-freeze) (from versions: none)
ERROR: No matching distribution found for setuptools<=60.10.0,>=59.0.1

Which seems to be correct:

nix-repl> python3Packages.setuptools.version
"63.2.0"

This might be a legitimate bug in cx_Freeze in nixpkgs, but I am going to abandon this line of investigation, because I do not think I should even be using cx_Freeze for something in nixpkgs.