]> jfr.im git - yt-dlp.git/blame - setup.py
release 2013.01.28
[yt-dlp.git] / setup.py
CommitLineData
2f1765c4
FV
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4from __future__ import print_function
cc51a7d4
FV
5from distutils.core import setup
6import pkg_resources
4efe62a0 7import sys
cc51a7d4 8
fec89790
FV
9try:
10 import py2exe
11 """This will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package"""
12except ImportError:
13 if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
14 print("Cannot import py2exe", file=sys.stderr)
15 exit(1)
16
cc51a7d4 17py2exe_options = {
770234af
FV
18 "bundle_files": 1,
19 "compressed": 1,
20 "optimize": 2,
21 "dist_dir": '.',
22 "dll_excludes": ['w9xpopen.exe']
23}
cc51a7d4 24py2exe_console = [{
a5741a3f 25 "script": "./youtube_dl/__main__.py",
770234af
FV
26 "dest_base": "youtube-dl",
27}]
fec89790
FV
28py2exe_params = {
29 'console': py2exe_console,
30 'options': { "py2exe": py2exe_options },
31 'zipfile': None
32}
770234af 33
fec89790
FV
34if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
35 params = py2exe_params
36else:
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'])]
a5741a3f 42 }
a5741a3f
FV
43
44# Get the version from youtube_dl/version.py without importing the package
2f1765c4 45exec(compile(open('youtube_dl/version.py').read(), 'youtube_dl/version.py', 'exec'))
87bec4c7 46
cc51a7d4
FV
47setup(
48 name = 'youtube_dl',
49 version = __version__,
a5741a3f
FV
50 description = 'YouTube video downloader',
51 long_description = 'Small command-line program to download videos from YouTube.com and other video sites.',
cc51a7d4
FV
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'],
53e89361 57
a5741a3f
FV
58 # Provokes warning on most systems (why?!)
59 #test_suite = 'nose.collector',
60 #test_requires = ['nosetest'],
770234af 61
2f1765c4
FV
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"
a5741a3f
FV
71 ],
72
fec89790 73 **params
cc51a7d4 74)