"Topic :: System :: Archiving",
]
+import re
+VERSIONFILE = "zfec/_version.py"
+verstr = "unknown"
+VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
+try:
+ verstrline = open(VERSIONFILE, "rt").read()
+except EnvironmentError:
+ pass # Okay, there is no version file.
+else:
+ mo = VSRE.search(verstrline)
+ if mo:
+ verstr = mo.group(1)
+ else:
+ print "unable to find version in %s" % (VERSIONFILE,)
+ raise RuntimeError("if %s.py exists, it must be well-formed" % (VERSIONFILE,))
+
setup(name='zfec',
- version='1.0.0',
+ install_requires=['pyutil>=1.0.0',],
+ version=verstr,
description='a fast erasure code with command-line, C, and Python interfaces',
long_description='Fast, portable, programmable erasure coding a.k.a. "forward error correction": the generation of redundant blocks of information such that if some blocks are lost then the original data can be recovered from the remaining blocks.',
author='Zooko O\'Whielacronx',
zfec web site: U{http://allmydata.com/source/zfec}
"""
-from util.version import Version
-
-# For an explanation of what the parts of the version string mean,
-# please see pyutil.version.
-__version__ = Version("1.0.0b3-0-STABLE")
-
-# Please put a URL or other note here which shows where to get the branch of
-# development from which this version grew.
-__sources__ = ["http://allmydata.org/source/zfec",]
+__version__ = "unknown"
+try:
+ from _version import __version__
+except ImportError:
+ # we're running in a tree that hasn't run make-version.py, so we don't
+ # know what our version is. This should not happen very often.
+ pass
from _fec import Encoder, Decoder, Error
import filefec, cmdline_zfec, cmdline_zunfec
# Author: Zooko Wilcox-O'Hearn
#
# This file is part of zfec.
-#
+
# 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)
-from twisted.trial import unittest
+import unittest
from zfec.util import mathutil