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