]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - setup.py
change ez_setup.py to find tarballs in misc/dependencies
[tahoe-lafs/tahoe-lafs.git] / setup.py
1 #! /usr/bin/env python
2
3 # Allmydata Tahoe -- secure, distributed storage grid
4
5 # Copyright (C) 2007 Allmydata, Inc.
6
7 # This file is part of tahoe.
8
9 # This program is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by the Free
11 # Software Foundation; either version 2 of the License, or (at your option)
12 # any later version, with the added permission that, if you become obligated
13 # to release a derived work under this licence (as per section 2.b), you may
14 # delay the fulfillment of this obligation for up to 12 months.  If you are
15 # obligated to release code under section 2.b of this licence, you are
16 # obligated to release it under these same terms, including the 12-month grace
17 # period clause.  See the COPYING file for details.
18 #
19 # If you would like to inquire about a commercial relationship with Allmydata,
20 # Inc., please contact partnerships@allmydata.com and visit
21 # http://allmydata.com/.
22
23 from ez_setup import use_setuptools
24 import sys
25 if 'cygwin' in sys.platform.lower():
26     min_version='0.6c6'
27 else:
28     min_version='0.6a9'
29 use_setuptools(min_version=min_version, download_base="file:misc/dependencies/")
30
31 from setuptools import Extension, setup
32 import re, os.path
33
34 trove_classifiers=[
35     "Development Status :: 3 - Alpha", 
36     "Environment :: Console",
37     "Environment :: Web Environment",
38     "License :: OSI Approved :: GNU General Public License (GPL)", 
39     "License :: DFSG approved",
40     "Intended Audience :: Developers", 
41     "Intended Audience :: End Users/Desktop",
42     "Intended Audience :: System Administrators",
43     "Operating System :: Microsoft",
44     "Operating System :: Microsoft :: Windows",
45     "Operating System :: Unix",
46     "Operating System :: POSIX :: Linux",
47     "Operating System :: POSIX",
48     "Operating System :: MacOS :: MacOS X",
49     "Operating System :: Microsoft :: Windows :: Windows NT/2000",
50     "Operating System :: OS Independent", 
51     "Natural Language :: English", 
52     "Programming Language :: C", 
53     "Programming Language :: Python", 
54     "Topic :: Utilities",
55     "Topic :: System :: Systems Administration",
56     "Topic :: System :: Filesystems",
57     "Topic :: System :: Distributed Computing",
58     "Topic :: Software Development :: Libraries",
59     "Topic :: Communications :: Usenet News",
60     "Topic :: System :: Archiving :: Backup", 
61     "Topic :: System :: Archiving :: Mirroring", 
62     "Topic :: System :: Archiving", 
63     ]
64
65
66 VERSIONFILE = "src/allmydata/_version.py"
67 verstr = "unknown"
68 if os.path.exists(VERSIONFILE):
69     VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
70     verstrline = open(VERSIONFILE, "rt").read()
71     mo = VSRE.search(verstrline)
72     if mo:
73         verstr = mo.group(1)
74     else:
75         print "unable to find version in src/allmydata/_version.py"
76         raise RuntimeError("if _version.py exists, it must be well-formed")
77
78
79 LONG_DESCRIPTION=\
80 """Welcome to the AllMyData "tahoe" project. This project implements a
81 secure, distributed, fault-tolerant storage grid.
82
83 The basic idea is that the data in this storage grid is spread over all
84 participating nodes, using an algorithm that can recover the data even if a
85 majority of the nodes are no longer available."""
86
87 setup(name='allmydata-tahoe',
88       version=verstr,
89       description='secure, distributed storage grid',
90       long_description=LONG_DESCRIPTION,
91       author='Allmydata, Inc.',
92       author_email='tahoe-dev@allmydata.org',
93       url='http://allmydata.org/',
94       license='GNU GPL',
95       packages=["allmydata", "allmydata.test", "allmydata.util",
96                 "allmydata.scripts",
97                 "allmydata.Crypto", "allmydata.Crypto.Cipher",
98                 "allmydata.Crypto.Hash", "allmydata.Crypto.Util",
99                 #"allmydata.Crypto.PublicKey",
100                 ],
101       package_dir={ "allmydata": "src/allmydata",},
102       scripts = ["bin/allmydata-tahoe"],
103       package_data={ 'allmydata': ['web/*.xhtml', 'web/*.html', 'web/*.css'] },
104       classifiers=trove_classifiers,
105       test_suite="allmydata.test",
106       install_requires=["zfec >= 1.0.3",
107                         "foolscap >= 0.1.6", "simplejson",
108                         #"nevow", # we need nevow, but it doesn't seem to be
109                                   # installable by easy_install
110                         ],
111       dependency_links=["http://allmydata.org/trac/tahoe/wiki/Dependencies",
112                         #  this form is used when the unpacked source
113                         #  distribution is copied into our tree:
114                         #"file:misc/dependencies/zfec-1.0.2/"
115                         #  and this form is used when we provide a tarball
116                         #"file:misc/dependencies/zfec-1.0.2.tar.gz",
117                         # The file: URL can start with either 'misc' or
118                         # './misc' to get a relative path.
119                         ],
120       ext_modules=[
121           Extension("allmydata.Crypto.Cipher.AES",
122                     include_dirs=["src/allmydata/Crypto"],
123                     sources=["src/allmydata/Crypto/AES.c"]),
124           Extension("allmydata.Crypto.Hash.SHA256",
125                     include_dirs=["src/allmydata/Crypto"],
126                     sources=["src/allmydata/Crypto/SHA256.c"]),
127           # _fastmath requires gmp. Since we're not using rsa yet, hold off
128           # on requiring this. (note that RSA.py doesn't require _fastmath,
129           # but I doubt we'd want to use the pure-python version).
130 #          Extension("allmydata.Crypto.PublicKey._fastmath",
131 #                    sources=["src/allmydata/Crypto/_fastmath.c"]),
132           ],
133       )