From: Zooko O'Whielacronx Date: Thu, 29 Jan 2009 19:56:40 +0000 (-0700) Subject: setup: require darcsver >= 1.2.0 and rely exclusively on darcsver to set the version... X-Git-Tag: allmydata-tahoe-1.3.0~118 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/biz?a=commitdiff_plain;h=4d0dc9c766ac0ad0fb681558c86d83635b197cc1;p=tahoe-lafs%2Ftahoe-lafs.git setup: require darcsver >= 1.2.0 and rely exclusively on darcsver to set the version string --- diff --git a/setup.cfg b/setup.cfg index b839a100..ee170383 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,3 +36,5 @@ find_links=misc/dependencies tahoe-deps ../tahoe-deps build = darcsver --count-all-patches develop --prefix=support make_executable build test = darcsver --count-all-patches develop --prefix=support make_executable build trial sdist = darcsver --count-all-patches sdist +install = darcsver --count-all-patches install +bdist_egg = darcsver --count-all-patches bdist_egg diff --git a/setup.py b/setup.py index 7cdf52cd..4f7e0ebc 100644 --- a/setup.py +++ b/setup.py @@ -117,20 +117,9 @@ trove_classifiers=[ ] -VERSIONFILE = "src/allmydata/_version.py" -verstr = "unknown" -try: - verstrline = open(VERSIONFILE, "rt").read() -except EnvironmentError: - pass # Okay, there is no version file. -else: - VSRE = r"^verstr = ['\"]([^'\"]*)['\"]" - mo = re.search(VSRE, verstrline, re.M) - if mo: - verstr = mo.group(1) - else: - print "unable to find version in %s" % (VERSIONFILE,) - raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,)) +# Note that the darcsver command from the darcsver plugin is needed to initialize the +# distribution's .version attribute correctly. (It does this either by examining darcs history, +# or if that fails by reading the src/allmydata/_version.py file). LONG_DESCRIPTION=\ """Welcome to the Tahoe project, a secure, decentralized, fault-tolerant @@ -158,7 +147,7 @@ setup_requires.extend(['setuptools_trial']) # darcsver is needed if you want "./setup.py darcsver" to write a new version stamp in # src/allmydata/_version.py, with a version number derived from darcs history. # http://pypi.python.org/pypi/darcsver -setup_requires.append('darcsver >= 1.1.5') +setup_requires.append('darcsver >= 1.2.0') if 'trial' in sys.argv[1:] or 'test' in sys.argv[1:]: # Cygwin requires the poll reactor to work at all. Linux requires the poll reactor to avoid @@ -357,7 +346,6 @@ class MySdist(sdist.sdist): from _auto_deps import install_requires setup(name='allmydata-tahoe', - version=verstr, description='secure, decentralized, fault-tolerant filesystem', long_description=LONG_DESCRIPTION, author='the allmydata.org Tahoe project',