]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - setup.py
fix the 'license' field of the PyPI db (not the Trove Classifiers that I was changing...
[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/", download_delay=0)
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 :: Free Software (GPL variant)", # Not a real acceptable value.  I guess this means we really need to get our licence DFSG/OSI approved.
41     # "License :: Open Source (GPL variant)", # Not a real acceptable value.  I guess this means we really need to get our licence DFSG/OSI 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 # Build _version.py before trying to extract a version from it. If we aren't
69 # running from a darcs checkout, this will leave any pre-existing _version.py
70 # alone.
71 try:
72     os.system(" ".join([sys.executable,
73                        "misc/make-version.py",
74                        "allmydata-tahoe",
75                        '"src/allmydata/_version.py"', # cygwin vs slashes
76                         ]))
77 except Exception, le:
78     pass
79 VERSIONFILE = "src/allmydata/_version.py"
80 verstr = "unknown"
81 if os.path.exists(VERSIONFILE):
82     VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
83     verstrline = open(VERSIONFILE, "rt").read()
84     mo = VSRE.search(verstrline)
85     if mo:
86         verstr = mo.group(1)
87     else:
88         print "unable to find version in src/allmydata/_version.py"
89         raise RuntimeError("if _version.py exists, it must be well-formed")
90
91
92 LONG_DESCRIPTION=\
93 """Welcome to the AllMyData "tahoe" project. This project implements a
94 secure, distributed, fault-tolerant storage grid.
95
96 The basic idea is that the data in this storage grid is spread over all
97 participating nodes, using an algorithm that can recover the data even if a
98 majority of the nodes are no longer available."""
99
100
101 setup(name='allmydata-tahoe',
102       version=verstr,
103       description='secure, distributed storage grid',
104       long_description=LONG_DESCRIPTION,
105       author='Allmydata, Inc.',
106       author_email='tahoe-dev@allmydata.org',
107       url='http://allmydata.org/',
108       license='GNU GPL v2 or later, plus transitive 12 month grace period; http://allmydata.org/trac/tahoe/browser/COPYING',
109       packages=["allmydata", "allmydata.test", "allmydata.util",
110                 "allmydata.scripts",
111                 "allmydata.Crypto", "allmydata.Crypto.Cipher",
112                 "allmydata.Crypto.Hash", "allmydata.Crypto.Util",
113                 #"allmydata.Crypto.PublicKey",
114                 ],
115       package_dir={ "allmydata": "src/allmydata",},
116       package_data={ 'allmydata': ['web/*.xhtml', 'web/*.html', 'web/*.css'] },
117       classifiers=trove_classifiers,
118       test_suite="allmydata.test",
119       install_requires=install_requires,
120       setup_requires=["setuptools_darcs_plugin >= 1.0",],
121       dependency_links=dependency_links,
122       entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
123       ext_modules=[
124           Extension("allmydata.Crypto.Cipher.AES",
125                     include_dirs=["src/allmydata/Crypto"],
126                     sources=["src/allmydata/Crypto/AES.c"]),
127           Extension("allmydata.Crypto.Hash.SHA256",
128                     include_dirs=["src/allmydata/Crypto"],
129                     sources=["src/allmydata/Crypto/SHA256.c"]),
130           # _fastmath requires gmp. Since we're not using rsa yet, hold off
131           # on requiring this. (note that RSA.py doesn't require _fastmath,
132           # but I doubt we'd want to use the pure-python version).
133 #          Extension("allmydata.Crypto.PublicKey._fastmath",
134 #                    sources=["src/allmydata/Crypto/_fastmath.c"]),
135           ],
136       zip_safe=False, # We prefer unzipped for easier access.
137       )