1 from distutils.core import setup
6 sys.stderr.write("Cannot import py2exe")
9 """This will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package"""
11 # If run without args, build executables
12 if len(sys.argv) == 1:
13 sys.argv.append("py2exe")
15 # os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # conflict with wine-py2exe.sh
16 sys.path.append('./youtube_dl')
23 "dll_excludes": ['w9xpopen.exe']
27 "script":"./youtube_dl/__main__.py",
28 "dest_base": "youtube-dl",
31 init_file = open('./youtube_dl/__init__.py')
32 for line in init_file.readlines():
33 if line.startswith('__version__'):
34 version = line[11:].strip(" ='\n")
39 setup(name='youtube-dl',
41 description='Small command-line program to download videos from YouTube.com and other video sites',
42 url='https://github.com/rg3/youtube-dl',
43 packages=['youtube_dl'],
46 options = {"py2exe": options},
51 shutil.rmtree("build")