2 # -*- coding: utf-8 -*-
4 from __future__ import print_function
10 from setuptools import setup
11 setuptools_available = True
13 from distutils.core import setup
16 # This will create an exe that needs Microsoft Visual C++ 2008
17 # Redistributable Package
20 if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
21 print("Cannot import py2exe", file=sys.stderr)
29 "dll_excludes": ['w9xpopen.exe'],
33 "script": "./youtube_dl/__main__.py",
34 "dest_base": "youtube-dl",
38 'console': py2exe_console,
39 'options': {"py2exe": py2exe_options},
43 if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
44 params = py2exe_params
47 'data_files': [ # Installing system-wide would require sudo...
48 ('etc/bash_completion.d', ['youtube-dl.bash-completion']),
49 ('share/doc/youtube_dl', ['README.txt']),
50 ('share/man/man1/', ['youtube-dl.1'])
53 if setuptools_available:
54 params['entry_points'] = {'console_scripts': ['youtube-dl = youtube_dl:main']}
56 params['scripts'] = ['bin/youtube-dl']
58 # Get the version from youtube_dl/version.py without importing the package
59 exec(compile(open('youtube_dl/version.py').read(),
60 'youtube_dl/version.py', 'exec'))
65 description='YouTube video downloader',
66 long_description='Small command-line program to download videos from'
67 ' YouTube.com and other video sites.',
68 url='https://github.com/rg3/youtube-dl',
69 author='Ricardo Garcia',
70 author_email='ytdl@yt-dl.org',
71 maintainer='Philipp Hagemeister',
72 maintainer_email='phihag@phihag.de',
73 packages=['youtube_dl', 'youtube_dl.extractor'],
75 # Provokes warning on most systems (why?!)
76 # test_suite = 'nose.collector',
77 # test_requires = ['nosetest'],
80 "Topic :: Multimedia :: Video",
81 "Development Status :: 5 - Production/Stable",
82 "Environment :: Console",
83 "License :: Public Domain",
84 "Programming Language :: Python :: 2.6",
85 "Programming Language :: Python :: 2.7",
86 "Programming Language :: Python :: 3",
87 "Programming Language :: Python :: 3.3"