]> Raphaƫl G. Git Repositories - youtubedl/blob - setup.py
Merge tag 'upstream/2012.12.11'
[youtubedl] / 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 try:
10 import py2exe
11 """This will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package"""
12 except ImportError:
13 if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
14 print("Cannot import py2exe", file=sys.stderr)
15 exit(1)
16
17 py2exe_options = {
18 "bundle_files": 1,
19 "compressed": 1,
20 "optimize": 2,
21 "dist_dir": '.',
22 "dll_excludes": ['w9xpopen.exe']
23 }
24 py2exe_console = [{
25 "script": "./youtube_dl/__main__.py",
26 "dest_base": "youtube-dl",
27 }]
28 py2exe_params = {
29 'console': py2exe_console,
30 'options': { "py2exe": py2exe_options },
31 'zipfile': None
32 }
33
34 if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
35 params = py2exe_params
36 else:
37 params = {
38 'scripts': ['bin/youtube-dl'],
39 'data_files': [('etc/bash_completion.d', ['youtube-dl.bash-completion']), # Installing system-wide would require sudo...
40 ('share/doc/youtube_dl', ['README.txt']),
41 ('share/man/man1/', ['youtube-dl.1'])]
42 }
43
44 # Get the version from youtube_dl/version.py without importing the package
45 exec(compile(open('youtube_dl/version.py').read(), 'youtube_dl/version.py', 'exec'))
46
47 setup(
48 name = 'youtube_dl',
49 version = __version__,
50 description = 'YouTube video downloader',
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 author = 'Ricardo Garcia',
54 maintainer = 'Philipp Hagemeister',
55 maintainer_email = 'phihag@phihag.de',
56 packages = ['youtube_dl'],
57
58 # Provokes warning on most systems (why?!)
59 #test_suite = 'nose.collector',
60 #test_requires = ['nosetest'],
61
62 classifiers = [
63 "Topic :: Multimedia :: Video",
64 "Development Status :: 5 - Production/Stable",
65 "Environment :: Console",
66 "License :: Public Domain",
67 "Programming Language :: Python :: 2.6",
68 "Programming Language :: Python :: 2.7",
69 "Programming Language :: Python :: 3",
70 "Programming Language :: Python :: 3.3"
71 ],
72
73 **params
74 )