I've taken a stab at initial macOS support. Stuff I had to change:
Enumeration of serial ports. On macOS, there are serial port devices for Bluetooth with names /dev/cu.BLTH and /dev/cu.Bluetooth-Incoming-Port which need to be skipped in the serial port enumeration. On macOS, we now look only for serial ports whose names contain usbmodem.
The piku.core.utils.remove() method needed a bit of special case handling for macOS extended attribute files, which will appear when the directory contents are enumerated but will go away when the file associated with them is removed, triggering a FileNotFoundError when os.remove() gets to them.
The piku.core.backup() method now excludes (on macOS only) a few folder and file patterns which are used by the OS and which will produce errors when trying to back them up.
I added a bit of macOS information to the README.md file and also cleaned up a few typos.
I have tested by creating a new project, adding a library, installing on a board, and opening the serial console/interacting with the CPY REPL. The board I tested with was a Circuit Playground Bluefruit.
I've taken a stab at initial macOS support. Stuff I had to change:
/dev/cu.BLTH
and/dev/cu.Bluetooth-Incoming-Port
which need to be skipped in the serial port enumeration. On macOS, we now look only for serial ports whose names containusbmodem
.piku.core.utils.remove()
method needed a bit of special case handling for macOS extended attribute files, which will appear when the directory contents are enumerated but will go away when the file associated with them is removed, triggering aFileNotFoundError
whenos.remove()
gets to them.piku.core.backup()
method now excludes (on macOS only) a few folder and file patterns which are used by the OS and which will produce errors when trying to back them up.I have tested by creating a new project, adding a library, installing on a board, and opening the serial console/interacting with the CPY REPL. The board I tested with was a Circuit Playground Bluefruit.