summaryrefslogtreecommitdiffstats
path: root/khashmir/setup.py
blob: a9e680a674c4f32a8e3242d1eaa1f28e29edbf24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License).  You may not copy or use this file, in either
# source code or executable form, except in compliance with the License.  You
# may obtain a copy of the License at http://www.bittorrent.com/license/.
#
# Software distributed under the License is distributed on an AS IS basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
# for the specific language governing rights and limitations under the
# License.

#!/usr/bin/env python

import os
import sys

try:
    import distutils.core
    import distutils.command.build_ext
except ImportError:
    raise SystemExit, """\
You don't have the python development modules installed.  

If you have Debian you can install it by running
    apt-get install python-dev

If you have RedHat and know how to install this from an RPM please
email us so we can put instructions here.
"""

try:
    import twisted
except ImportError:
    raise SystemExit, """\
You don't have Twisted installed.

Twisted can be downloaded from 
    http://twistedmatrix.com/products/download

Anything later that version 1.0.3 should work
"""

try:
    import sqlite
except ImportError:
    raise SystemExit, """\
You don't have PySQLite installed.

PySQLite can be downloaded from 
    http://sourceforge.net/project/showfiles.php?group_id=54058&release_id=139482
"""

setup_args = {
    'name': 'khashmir',
    'author': 'Andrew Loewenstern',
    'author_email': 'burris@users.sourceforge.net',
    'licence': 'MIT',
    'package_dir': {'khashmir': '.'},
    'packages': [
        'khashmir', 
    ],
}

if hasattr(distutils.dist.DistributionMetadata, 'get_keywords'):
    setup_args['keywords'] = "internet tcp p2p"

if hasattr(distutils.dist.DistributionMetadata, 'get_platforms'):
    setup_args['platforms'] = "win32 posix"

if __name__ == '__main__':
    apply(distutils.core.setup, (), setup_args)