3D slicer for MAC cannot install slicer extensions from files

Hi,

I am developing a pure-python extension of Slicer. It is, at this point, private, so I cannot distribute it through the general extension server, and I have distributed it internally as a zip file. Most users are on Windows, and had no issues, but on a Mac the extension could not be installed.

This is not the issue of 3D slicer for MAC cannot install slicer extensions – extensions from the manager are installed with no problem; but when trying to install the Zip file, we get

ctk::copyDirRecursively: Failed to copy nonexistent directory "/Applications/Slicer.app/Contents/Extensions-30893/MyExtension/30893-macosx-amd64-MyExtension-git8bf4715-2022-08-22/Slicer.app/Contents/Extensions-30893/MyExtension"
Failed to copy directory /Applications/Slicer.app/Contents/Extensions-30893/MyExtension/30893-macosx-amd64-MyExtension-git8bf4715-2022-08-22/Slicer.app/Contents/Extensions-30893/MyExtension into directory /Applications/Slicer.app/Contents/Extensions-30893/MyExtension-XXXXXX

(30893 is the build number for Slicer 5.0.3, I’ve replaced my real extension name with “MyExtension” here)

I have constructed the zip file “manually” – its contents are

+ 30893-macosx-amd64-MyExtension-git8bf4715-2022-08-22
| + lib
  | + Slicer-5.0
    | + qt-scripted-modules
      | MyExtension.py
| + share
  | + Slicer-5.0
    | CMakeLists.txt
    | MyExtension.s4ext

What am I doing wrong?

… what I was doing wrong was to assume that, because the module code in Python is cross-platform, the packaging should be similar. The archive structure for a Mac extension is completely different, I see.