1 from distutils.core import setup, Command
6 sys.stderr.write("Cannot import py2exe")
9 """The p2exe option will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package.
10 python setup.py py2exe
11 You can also build a zip executable with
12 python setup.py bdist --format=zip
14 The test suite can be run with
18 The actual version is defined by the last git tag
21 # If run without args, build executables
22 #if len(sys.argv) == 1:
23 # sys.argv.append("py2exe")
25 # os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # conflict with wine-py2exe.sh
26 #sys.path.append('./youtube_dl')
33 "dll_excludes": ['w9xpopen.exe']
37 "script":"./youtube_dl/__main__.py",
38 "dest_base": "youtube-dl",
41 init_file = open('./youtube_dl/__init__.py')
44 #return the last tag name
45 version = subprocess.checkoutput(["git", "describe", "--abbrev=0", "--tags"])
49 setup(name='youtube-dl',
51 long_description='Small command-line program to download videos from YouTube.com and other video sites',
52 url='https://github.com/rg3/youtube-dl',
53 packages=['youtube_dl'],
55 test_suite='nose.collector',
56 test_requires=['nosetest'],
58 options={"py2exe": options},
59 scripts=['bin/youtube-dl'],
64 #shutil.rmtree("build")