]> git.pld-linux.org Git - packages/clive.git/blob - clive-setup.py
- updated to 0.4.18
[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 sys.path.insert(0, 'src')
31
32 import clive as _clive
33
34 if sys.platform == 'win32':
35         try:
36                 import py2exe
37                 _py2exe_avail = 1
38         except ImportError:
39                 _py2exe_avail = 0
40
41 desc = 'Video extraction tool'
42
43 ldesc = 'Video extraction tool for Youtube, Google ' \
44         'video and other video websites'
45
46 author = _clive.__author__.rsplit(' ', 1)[0]
47
48 author_email = re.sub('(^<)|(>)', '',
49         _clive.__author__.rsplit(' ',1)[1])
50
51 classifiers = [
52   'Environment :: Console',
53   'Intended Audience :: End Users/Desktop',
54   'Operating System :: POSIX',
55   'Programming Language :: Python',
56   'License :: OSI Approved :: GNU General Public License (GPL)',
57   'Natural Language :: English',
58   'Topic :: Internet',
59   'Topic :: Utilities'
60 ]
61
62 manpage = 'man/clive.1'
63 manpage_gz = manpage + '.gz'
64 data_files = [ ('share/man/man1', [manpage_gz]) ]
65
66 setup_args = dict(
67         name = 'clive',
68         version = _clive.__version__,
69         description = desc,
70         long_description = ldesc,
71         maintainer = author,
72         maintainer_email = author_email,
73         url = _clive.__url__,
74         license = 'GPL',
75         scripts = ['src/scripts/clive'],
76         packages = ['clive'],
77         package_dir = {'clive':'src/clive'},
78         data_files = data_files,
79         classifiers = classifiers,
80         platforms = ['Any']
81 )
82
83 if sys.platform == 'win32' and _py2exe_avail:
84         setup_args['console'] = ['src/scripts/clive']
85         setup_args['data_files'] = []
86
87 # gzip clive.1; otherwise bdist_rpm will fail
88 gzip.GzipFile(manpage_gz, 'w').write(open(manpage).read())
89
90 setup(**setup_args)
91
92 try: # cleanup
93         os.remove(manpage_gz)
94 except:
95         pass
96
This page took 0.059069 seconds and 3 git commands to generate.