Help building podman-py

I’m attempting to add podman-py using the Python build instructions for pypi packages. I’m getting an error that `module ‘podman’ has no attribute ‘version’.

Here’s the error and partial configuration.nix. It builds fine on my Fedora laptop with the classic setup.py build --user.

Anyone have any ideas how to fix?

Solved. The requirements changed between versions and I was usingtomli instead of toml so the version wasn’t getting correctly parsed from the source. For reference:

  my-python-packages = p: with p; [
    (
      buildPythonPackage rec {
        pname = "podman";
        version = "4.4.1";
        src = fetchPypi {
          inherit pname version;
          sha256 = "sha256-pvvNBgPTBRnc0F5d2waVq5BBjNBuLeloXQ/D0taUad4=";
        };
        doCheck = false;
        propagatedBuildInputs = [
          # Specify dependencies
          pkgs.python310Packages.pyxdg
          pkgs.python310Packages.requests
          pkgs.python310Packages.setuptools
          pkgs.python310Packages.sphinx
          pkgs.python310Packages.toml
          pkgs.python310Packages.urllib3
          pkgs.python310Packages.wheel
        ];
      }
    )
  ];