You need to:
- Download OpenCV
- Use CMake to tell it to compile statically and to tell it to compile the Python module
- Compile, and install into a directory you want.
- Find in that directory the file under a directory called python, called cv2.so
- Distribute that file with your Python code.
Now that I told you how to do it, let me tell you why your approach isn't a very good idea:
- If the version of Python changes, you need to recompile (the so file) and redistribute your entire application
- If the version of OpenCV changes you will need to recompile (the so file) and redistribute your entire application
- You don't control what version of Python your users have
- There can be important subtleties in version of libjpg, libtiff, zlib and others that could prevent your application from working, all outside your control.
- You are converting a multi-platform application into a platform specific solution.