Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Request: publish a distribution that works with Python 3.10 under Nix on macOS

Open rossng opened this issue 1 year ago • 2 comments

Checklist

Proposed new feature or change

I use Nix with poetry2nix to build my Python 3.10 environment on both macOS and Linux. At the moment, I'm not able to use Open3D. This is because:

  • Nix currently builds everything for the macOS 11 SDK. This will hopefully change at some point, but it could be a while.
  • I use an arm64 MacBook.
  • poetry2nix turns my list of Python dependencies into a set of Nix packages. It searches for binary or source distributions for each PyPI package that are compatible with the system.
  • Open3D does not publish a source distribution, so it cannot use this.
    • It's also rather difficult to use the source directly from GitHub. Open3D's setup.py contains variables like the package name that are expected to be substituted by CMake (I think?) and so it cannot be executed directly.
  • Open3D does publish a lot of wheels, but
    • open3d-0.18.0-cp310-cp310-macosx_13_0_arm64.whl is not usable because it targets macOS 13 SDK
    • open3d-0.18.0-cp310-cp310-macosx_11_0_x86_64.whl is not usable because it targets the wrong arch

There are a few possible solutions:

  • Also publish a source distribution to PyPI, with template variables in setup.py already substituted.
  • Publish a universal wheel which works on both x86 and arm64, like the one available for Python 3.11: open3d-0.18.0-cp310-cp310-macosx_10_15_universal2.whl
  • Change the target SDK of the arm64 wheel (assuming it doesn't depend on anything in 12/13), creating open3d-0.18.0-cp310-cp310-macosx_11_0_arm64.whl

I haven't looked much into the Open3D packaging pipeline so not sure how it's currently done. If there's a contribution that I can make to enable this change, please let me know.

References

No response

Additional information

No response

rossng avatar Mar 16 '24 15:03 rossng

Please check this PR #6695 to see if it meets your needs. We cannot publish / support more packages - there are too many variants already, but we can definitely look at updating the target SDK to improve compatibility.

The Open3D build system is really complex - there isn't much point to publishing a source distribution that people won't be able to build easily.

ssheorey avatar Mar 28 '24 06:03 ssheorey

I believe #6695 will resolve this issue (there was an issue with wheel naming last time I checked it, but that seems to have been resolved).

rossng avatar Mar 28 '24 14:03 rossng