]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - setup.py
setup: attempt to invoke make-version.py whenever setup.py is evaluated
[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 from calcdeps import install_requires, dependency_links
35
36 trove_classifiers=[
37     "Development Status :: 3 - Alpha", 
38     "Environment :: Console",
39     "Environment :: Web Environment",
40     "License :: OSI Approved :: GNU General Public License (GPL)", 
41     "License :: DFSG approved",
42     "Intended Audience :: Developers", 
43     "Intended Audience :: End Users/Desktop",
44     "Intended Audience :: System Administrators",
45     "Operating System :: Microsoft",
46     "Operating System :: Microsoft :: Windows",
47     "Operating System :: Unix",
48     "Operating System :: POSIX :: Linux",
49     "Operating System :: POSIX",
50     "Operating System :: MacOS :: MacOS X",
51     "Operating System :: Microsoft :: Windows :: Windows NT/2000",
52     "Operating System :: OS Independent", 
53     "Natural Language :: English", 
54     "Programming Language :: C", 
55     "Programming Language :: Python", 
56     "Topic :: Utilities",
57     "Topic :: System :: Systems Administration",
58     "Topic :: System :: Filesystems",
59     "Topic :: System :: Distributed Computing",
60     "Topic :: Software Development :: Libraries",
61     "Topic :: Communications :: Usenet News",
62     "Topic :: System :: Archiving :: Backup", 
63     "Topic :: System :: Archiving :: Mirroring", 
64     "Topic :: System :: Archiving", 
65     ]
66
67
68 try:
69     import os
70     os.system("python misc/make-version.py \"allmydata-tahoe\" \"src/allmydata/_version.py\"")
71 except Exception, le:
72     pass
73 VERSIONFILE = "src/allmydata/_version.py"
74 verstr = "unknown"
75 if os.path.exists(VERSIONFILE):
76     VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
77     verstrline = open(VERSIONFILE, "rt").read()
78     mo = VSRE.search(verstrline)
79     if mo:
80         verstr = mo.group(1)
81     else:
82         print "unable to find version in src/allmydata/_version.py"
83         raise RuntimeError("if _version.py exists, it must be well-formed")
84
85
86 LONG_DESCRIPTION=\
87 """Welcome to the AllMyData "tahoe" project. This project implements a
88 secure, distributed, fault-tolerant storage grid.
89
90 The basic idea is that the data in this storage grid is spread over all
91 participating nodes, using an algorithm that can recover the data even if a
92 majority of the nodes are no longer available."""
93
94
95 setup(name='allmydata-tahoe',
96       version=verstr,
97       description='secure, distributed storage grid',
98       long_description=LONG_DESCRIPTION,
99       author='Allmydata, Inc.',
100       author_email='tahoe-dev@allmydata.org',
101       url='http://allmydata.org/',
102       license='GNU GPL',
103       packages=["allmydata", "allmydata.test", "allmydata.util",
104                 "allmydata.scripts",
105                 "allmydata.Crypto", "allmydata.Crypto.Cipher",
106                 "allmydata.Crypto.Hash", "allmydata.Crypto.Util",
107                 #"allmydata.Crypto.PublicKey",
108                 ],
109       package_dir={ "allmydata": "src/allmydata",},
110       package_data={ 'allmydata': ['web/*.xhtml', 'web/*.html', 'web/*.css'] },
111       classifiers=trove_classifiers,
112       test_suite="allmydata.test",
113       install_requires=install_requires,
114       dependency_links=dependency_links,
115       entry_points = { 'console_scripts': [ 'allmydata-tahoe = allmydata.scripts.runner:run' ] },
116       ext_modules=[
117           Extension("allmydata.Crypto.Cipher.AES",
118                     include_dirs=["src/allmydata/Crypto"],
119                     sources=["src/allmydata/Crypto/AES.c"]),
120           Extension("allmydata.Crypto.Hash.SHA256",
121                     include_dirs=["src/allmydata/Crypto"],
122                     sources=["src/allmydata/Crypto/SHA256.c"]),
123           # _fastmath requires gmp. Since we're not using rsa yet, hold off
124           # on requiring this. (note that RSA.py doesn't require _fastmath,
125           # but I doubt we'd want to use the pure-python version).
126 #          Extension("allmydata.Crypto.PublicKey._fastmath",
127 #                    sources=["src/allmydata/Crypto/_fastmath.c"]),
128           ],
129       zip_safe=False, # We prefer unzipped for easier access.
130       )