pip installs fine!
[youtube-dl] / setup.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 from __future__ import print_function
5 from distutils.core import setup
6 import pkg_resources
7 import sys
8
9 py2exe_options = {
10     "bundle_files": 1,
11     "compressed": 1,
12     "optimize": 2,
13     "dist_dir": '.',
14     "dll_excludes": ['w9xpopen.exe']
15 }
16
17 py2exe_console = [{
18     "script": "./youtube_dl/__main__.py",
19     "dest_base": "youtube-dl",
20 }]
21
22 try:
23     import py2exe
24     """This will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package"""
25     py2exe_params = {
26         'console': py2exe_console,
27         'options': { "py2exe": py2exe_options },
28         'zipfile': None
29     }
30 except ImportError:
31     if 'py2exe' in sys.argv:
32         print("Cannot import py2exe", file=sys.stderr)
33         exit(1)
34     py2exe_params = {}
35
36 # Get the version from youtube_dl/version.py without importing the package
37 exec(compile(open('youtube_dl/version.py').read(), 'youtube_dl/version.py', 'exec'))
38
39 setup(
40     name = 'youtube_dl',
41     version = __version__,
42     description = 'YouTube video downloader',
43     long_description = 'Small command-line program to download videos from YouTube.com and other video sites.',
44     url = 'https://github.com/rg3/youtube-dl',
45     author = 'Ricardo Garcia',
46     maintainer = 'Philipp Hagemeister',
47     maintainer_email = 'phihag@phihag.de',
48     packages = ['youtube_dl'],
49
50     # Provokes warning on most systems (why?!)
51     #test_suite = 'nose.collector',
52     #test_requires = ['nosetest'],
53
54     scripts = ['bin/youtube-dl'],
55     data_files = [('etc/bash_completion.d', ['youtube-dl.bash-completion']), # Installing system-wide would require sudo...
56                   ('share/doc/youtube_dl', ['README.txt']),
57                   ('share/man/man1/', ['youtube-dl.1']) ],
58
59     classifiers = [
60         "Topic :: Multimedia :: Video",
61         "Development Status :: 5 - Production/Stable",
62         "Environment :: Console",
63         "License :: Public Domain",
64         "Programming Language :: Python :: 2.6",
65         "Programming Language :: Python :: 2.7",
66         "Programming Language :: Python :: 3",
67         "Programming Language :: Python :: 3.3"
68     ],
69
70     **py2exe_params
71 )