4 ms·
Have you tried shipping a python application to end users while relying on the OS X system python? In my experience, this is an extremely painful process. You
by burrows 11y ago
Have you tried shipping a python application to end users while relying on the OS X system python? In my experience, this is an extremely painful process.
You would either need to do all of your development/testing with the system python or ensure that you're development environment is compatible with the system python (including stuff like distutils.util.get_platform(), https://github.com/MacPython/wiki/wiki/Spinning-wheels https://github.com/MacPython/wiki/wiki/Spinning-wheels).
What do you do when Apple doesn't update their python with some patch you want?
- makecheck 11y agoYes, I do this for my project. Although, I do not attempt to install any libraries, I keep everything in the application bundle and set environment variables as needed. It is limiting in the sense that I must use the Python version that Apple does but at the same time, the shipping executable is downright tiny compared to most Mac OS X applications.
- burrows 11y agoAre you modifying sys.path() to load the dependencies that are shipped with the app; or some other technique?
- makecheck 11y agoI use the location of the script to find the absolute path to the bundle (MacOS folder), from which I can work backwards using ".." to find other things like bundled libraries. In my case some of the libraries are also compiled so I have a starter script that sets DYLD_LIBRARY_PATH, PYTHONPATH, etc. and runs a 2nd script that can then successfully import whatever is required.