Once you reach the point of being ready to share your application with others, you will need a way to package it up and ship it out. wxPython applications can be distributed in a similar way to any other Python application or script—by creating a
setup.py script and using the
distutils module's setup function. However, this recipe focuses on how to build standalone executables for Windows and OS X so that your users don't need to install all the dependencies that your application has from your development environment. This can be accomplished using
py2exe on Windows and
py2app on OS X. So, in this recipe, we will consider how to make a
setup.py script to leverage these tools and generate standalone executables.