]> git.pld-linux.org Git - packages/clive.git/blob - clive-setup.py
- cp from clive-0.4.6/setup.py
[packages/clive.git] / clive-setup.py
1 #!/usr/bin/env python
2 # -*- coding: ascii -*-
3
4 ###########################################################################
5 # clive, video extraction utility
6 # Copyright (C) 2007-2008 Toni Gundogdu
7 #
8 # clive is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 0.1.2-1307 USA
21 ###########################################################################
22
23 import sys
24 import re
25 import os
26 import gzip
27
28 from distutils.core import setup
29
30 import clive as _clive
31
32 if sys.platform == 'win32':
33         try:
34                 import py2exe
35                 _py2exe_avail = 1
36         except ImportError:
37                 _py2exe_avail = 0
38
39 desc = 'Video extraction tool'
40
41 ldesc = 'Video extraction tool for Youtube, Google ' \
42         'video and other video websites'
43
44 author = _clive.__author__.rsplit(' ', 1)[0]
45
46 author_email = re.sub('(^<)|(>)', '',
47         _clive.__author__.rsplit(' ',1)[1])
48
49 classifiers = [
50   'Environment :: Console',
51   'Intended Audience :: End Users/Desktop',
52   'Operating System :: POSIX',
53   'Programming Language :: Python',
54   'License :: OSI Approved :: GNU General Public License (GPL)',
55   'Natural Language :: English',
56   'Topic :: Internet',
57   'Topic :: Utilities'
58 ]
59
60 manpage = 'man/clive.1'
61 manpage_gz = manpage + '.gz'
62 data_files = [ ('share/man/man1', [manpage_gz]) ]
63
64 setup_args = dict(
65         name = 'clive',
66         version = _clive.__version__,
67         description = desc,
68         long_description = ldesc,
69         maintainer = author,
70         maintainer_email = author_email,
71         url = _clive.__url__,
72         license = 'GPL',
73         scripts = ['scripts/clive'],
74         packages = ['clive'],
75         package_dir = {'clive':'clive'},
76         data_files = data_files,
77         classifiers = classifiers,
78         platforms = ['Any']
79 )
80
81 if sys.platform == 'win32' and _py2exe_avail:
82         setup_args['console'] = ['scripts/clive']
83         setup_args['data_files'] = []
84
85 # gzip clive.1; otherwise bdist_rpm will fail
86 gzip.GzipFile(manpage_gz, 'w').write(open(manpage).read())
87
88 setup(**setup_args)
89
90 try: # cleanup
91         os.remove(manpage_gz)
92 except:
93         pass
94
This page took 0.437287 seconds and 3 git commands to generate.