Package Windows binaries while running under Linux

Sample ( python code, It’s rest application that run with waitress wsgi server

$ cat ~/ws/wine/
from pycnic.core import WSGI, Handler
from waitress import serve

class Hello(Handler):
    def get(self, name="World"):
        return {"message": "Hello, %s!" % (name)}

class app(WSGI):
    routes = [
        ('/', Hello()),
        ('/([\w]+)', Hello())

serve(app, host='', port=9999)

Install Wine

$ sudo apt-get install wine
$ winecfg

Install Python

# note: Download 32bit of python from
$ wine msiexec -i ~/ws/tools/windows/python/python-2.7.13.msi  ALLUSERS=1
# @note: Install VCForPython27 if we want complie some python package from source code
$ wine msiexec /i ~/ws/tools/windows/python/VCForPython27.msi ALLUSERS=1
# Install python dependency of sample program by using pip
$ cd ~/ws/wine/
$ wine ~/.wine/drive_c/Python27/python.exe ~/.wine/drive_c/Python27/Scripts/pip.exe install waitress
$ wine ~/.wine/drive_c/Python27/python.exe ~/.wine/drive_c/Python27/Scripts/pip.exe install pycnic
# Install pyinstaller
$ wine ~/.wine/drive_c/Python27/python.exe ~/.wine/drive_c/Python27/Scripts/pip.exe install pyinstaller
$ cp ~/ws/wine/  ~/.wine/drive_c/users/$USER/Desktop/
$ wine ~/.wine/drive_c/Python27/Scripts/pyinstaller.exe --onefile  ~/.wine/drive_c/users/$USER/Desktop/
$ ls dist/