Python and _scproxy

I am developing on Mac and distributing on Linux. I am trying to test my Docker build locally before pushing to my build machine. My service is a python app that accesses an SQL database.

The result is that I have a dependency on _scproxy in my codebase which is part of the Mac specific build of Python, but this does not seem to be included in any images. I keep getting stuck on this import as it is not found.

_scproxy would not work on other systems. It is part of CPython written in C

As you can see in the comment, it uses the SystemConfiguration framework which is for Apple products

Depending on what you need it for, you can find an alternative for Linux and either use it conditionally depending on the actual platform or just use the one that works on Linux and run it in a container when you are on Mac. If it needs Docker, you can mount the Docker socket from the virtual machine of Docker Desktop and run a Docker client inside the container too f that is necessary.