"""
py2app/py2exe build script for PPTX removal tool.

Usage (Mac OS X):
 python setup.py py2app

Usage (Windows):
 python setup.py py2exe

"""
import sys
from distutils.core import setup

mainscript = 'drop_pptx_here.py'

if sys.platform == 'darwin':
    extra_options = dict(
        setup_requires=['py2app'],
        app=[mainscript],
        # Cross-platform applications generally expect sys.argv to
        # be used for opening files.
        options=dict(py2app=dict(argv_emulation=True)),
    )
elif sys.platform == 'win32':
    extra_options = dict(
        setup_requires=['py2exe'],
        app = [mainscript],
        options = dict(py2exe=dict(bundle_files=1, argv_emulation=True)),
    )
else:
    extra_options = dict(
        # Normally unix-like platforms will use "setup.py install"
        # and install the main script as such
        scripts=[mainscript],
    )

setup(
    name="drop_pptx_here",
    **extra_options
)