2007-03-29 21:01:28 +00:00
|
|
|
#! /usr/bin/env python
|
2006-12-05 08:29:26 +00:00
|
|
|
|
2007-04-30 20:06:09 +00:00
|
|
|
# Allmydata Tahoe -- secure, distributed storage grid
|
2007-04-27 20:47:15 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2007 Allmydata, Inc.
|
|
|
|
#
|
|
|
|
# This file is part of tahoe.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License as published by the Free
|
|
|
|
# Software Foundation; either version 2 of the License, or (at your option)
|
|
|
|
# any later version, with the added permission that, if you become obligated
|
|
|
|
# to release a derived work under this licence (as per section 2.b), you may
|
2007-09-12 18:31:57 +00:00
|
|
|
# delay the fulfillment of this obligation for up to 12 months. If you are
|
|
|
|
# obligated to release code under section 2.b of this licence, you are
|
|
|
|
# obligated to release it under these same terms, including the 12-month grace
|
|
|
|
# period clause. See the COPYING file for details.
|
2007-04-27 20:47:15 +00:00
|
|
|
#
|
|
|
|
# If you would like to inquire about a commercial relationship with Allmydata,
|
|
|
|
# Inc., please contact partnerships@allmydata.com and visit
|
|
|
|
# http://allmydata.com/.
|
2006-12-05 08:29:26 +00:00
|
|
|
|
2007-12-21 21:42:38 +00:00
|
|
|
import sys, re, os
|
2007-11-09 21:58:03 +00:00
|
|
|
try:
|
|
|
|
from ez_setup import use_setuptools
|
|
|
|
except ImportError:
|
|
|
|
pass
|
2007-09-13 01:57:10 +00:00
|
|
|
else:
|
2007-11-09 21:58:03 +00:00
|
|
|
if 'cygwin' in sys.platform.lower():
|
|
|
|
min_version='0.6c6'
|
|
|
|
else:
|
2007-12-11 03:06:59 +00:00
|
|
|
# foolscap uses a module-level os.urandom() during import, which
|
|
|
|
# breaks inside older setuptools' sandboxing. 0.6c4 is the first
|
|
|
|
# version which fixed this problem.
|
|
|
|
min_version='0.6c4'
|
2007-12-20 23:18:14 +00:00
|
|
|
download_base = "file:"+os.path.join('misc', 'dependencies')+os.path.sep
|
2007-12-11 03:17:34 +00:00
|
|
|
use_setuptools(min_version=min_version,
|
2007-12-20 23:13:10 +00:00
|
|
|
download_base=download_base,
|
2007-12-11 03:17:34 +00:00
|
|
|
download_delay=0)
|
2007-09-13 21:51:19 +00:00
|
|
|
|
2007-11-10 01:04:19 +00:00
|
|
|
from setuptools import Extension, find_packages, setup
|
2006-12-14 10:25:30 +00:00
|
|
|
|
2007-09-15 22:05:35 +00:00
|
|
|
from calcdeps import install_requires, dependency_links
|
|
|
|
|
2007-04-27 20:47:15 +00:00
|
|
|
trove_classifiers=[
|
|
|
|
"Development Status :: 3 - Alpha",
|
|
|
|
"Environment :: Console",
|
|
|
|
"Environment :: Web Environment",
|
2007-10-16 03:48:09 +00:00
|
|
|
# "License :: Free Software (GPL variant)", # Not a real acceptable value. I guess this means we really need to get our licence DFSG/OSI approved.
|
|
|
|
# "License :: Open Source (GPL variant)", # Not a real acceptable value. I guess this means we really need to get our licence DFSG/OSI approved.
|
2007-04-27 20:47:15 +00:00
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Intended Audience :: End Users/Desktop",
|
|
|
|
"Intended Audience :: System Administrators",
|
|
|
|
"Operating System :: Microsoft",
|
|
|
|
"Operating System :: Microsoft :: Windows",
|
|
|
|
"Operating System :: Unix",
|
|
|
|
"Operating System :: POSIX :: Linux",
|
|
|
|
"Operating System :: POSIX",
|
|
|
|
"Operating System :: MacOS :: MacOS X",
|
|
|
|
"Operating System :: Microsoft :: Windows :: Windows NT/2000",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Natural Language :: English",
|
|
|
|
"Programming Language :: C",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Topic :: Utilities",
|
|
|
|
"Topic :: System :: Systems Administration",
|
|
|
|
"Topic :: System :: Filesystems",
|
|
|
|
"Topic :: System :: Distributed Computing",
|
|
|
|
"Topic :: Software Development :: Libraries",
|
|
|
|
"Topic :: Communications :: Usenet News",
|
|
|
|
"Topic :: System :: Archiving :: Backup",
|
|
|
|
"Topic :: System :: Archiving :: Mirroring",
|
|
|
|
"Topic :: System :: Archiving",
|
|
|
|
]
|
2006-12-14 10:25:30 +00:00
|
|
|
|
2007-05-04 03:14:07 +00:00
|
|
|
|
2007-09-24 19:38:59 +00:00
|
|
|
# Build _version.py before trying to extract a version from it. If we aren't
|
|
|
|
# running from a darcs checkout, this will leave any pre-existing _version.py
|
|
|
|
# alone.
|
2007-09-24 01:43:36 +00:00
|
|
|
try:
|
2007-12-21 21:42:38 +00:00
|
|
|
(cin, cout, cerr,) = os.popen3("darcsver --quiet allmydata-tahoe src/allmydata/_version.py")
|
|
|
|
print cout.read()
|
2007-09-24 01:43:36 +00:00
|
|
|
except Exception, le:
|
|
|
|
pass
|
2007-09-12 23:02:23 +00:00
|
|
|
VERSIONFILE = "src/allmydata/_version.py"
|
2007-05-04 03:14:07 +00:00
|
|
|
verstr = "unknown"
|
2007-12-21 21:42:38 +00:00
|
|
|
VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
|
|
|
|
try:
|
2007-05-04 03:14:07 +00:00
|
|
|
verstrline = open(VERSIONFILE, "rt").read()
|
2007-12-21 21:42:38 +00:00
|
|
|
except EnvironmentError:
|
|
|
|
pass # Okay, there is no version file.
|
|
|
|
else:
|
2007-05-04 03:14:07 +00:00
|
|
|
mo = VSRE.search(verstrline)
|
|
|
|
if mo:
|
|
|
|
verstr = mo.group(1)
|
|
|
|
else:
|
2007-12-21 21:42:38 +00:00
|
|
|
print "unable to find version in %s" % (VERSIONFILE,)
|
|
|
|
raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,))
|
2007-08-14 20:57:41 +00:00
|
|
|
|
|
|
|
LONG_DESCRIPTION=\
|
2007-10-16 04:35:09 +00:00
|
|
|
"""Welcome to the AllMyData "tahoe" project. This project implements a secure,
|
|
|
|
distributed, fault-tolerant storage grid under a Free Software licence.
|
2006-12-05 08:29:26 +00:00
|
|
|
|
2007-04-30 20:06:09 +00:00
|
|
|
The basic idea is that the data in this storage grid is spread over all
|
2007-04-27 20:47:15 +00:00
|
|
|
participating nodes, using an algorithm that can recover the data even if a
|
2007-08-14 20:57:41 +00:00
|
|
|
majority of the nodes are no longer available."""
|
|
|
|
|
2007-09-13 22:37:27 +00:00
|
|
|
|
2007-08-14 20:57:41 +00:00
|
|
|
setup(name='allmydata-tahoe',
|
|
|
|
version=verstr,
|
|
|
|
description='secure, distributed storage grid',
|
|
|
|
long_description=LONG_DESCRIPTION,
|
2007-04-27 20:47:15 +00:00
|
|
|
author='Allmydata, Inc.',
|
|
|
|
author_email='tahoe-dev@allmydata.org',
|
|
|
|
url='http://allmydata.org/',
|
2007-10-16 03:55:10 +00:00
|
|
|
license='GNU GPL v2 or later, plus transitive 12 month grace period; http://allmydata.org/trac/tahoe/browser/COPYING',
|
2007-11-10 01:04:19 +00:00
|
|
|
package_dir = {'':'src'},
|
|
|
|
packages=find_packages("src"),
|
2007-04-27 20:47:15 +00:00
|
|
|
classifiers=trove_classifiers,
|
|
|
|
test_suite="allmydata.test",
|
2007-09-15 22:05:35 +00:00
|
|
|
install_requires=install_requires,
|
2007-11-10 01:04:19 +00:00
|
|
|
include_package_data=True,
|
|
|
|
setup_requires=["setuptools_darcs >= 1.0.5",],
|
2007-09-13 22:37:27 +00:00
|
|
|
dependency_links=dependency_links,
|
2007-10-11 10:38:24 +00:00
|
|
|
entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
|
2007-09-13 22:37:55 +00:00
|
|
|
zip_safe=False, # We prefer unzipped for easier access.
|
2007-12-21 21:42:38 +00:00
|
|
|
extras_require={'autoversioning':'pyutil >= 1.3.8'},
|
2007-04-27 20:47:15 +00:00
|
|
|
)
|