Now the allmydata python package, the setup.py script, and the debian packages all get their tahoe version number from the same place.
mkdir -p client-basedir/storage
mkdir -p client-basedir2/storage
-DEBVER=`head -1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*$$/\1/' | sed -e 's/^\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$$/\1/'`
-DEBSTRING=$(DEBVER)-T`date +%s`
+VER=$(shell python -c "import os,re;print re.search(\"verstr=['\\\"](.*?)['\\\"]\", open(os.path.join('src', 'allmydata', '__init__.py')).readline()).group(1)")
+DEBSTRING=$(VER)-T`date +%s`
DEBCOMMENTS="'make deb' build"
show:
- echo $(DEBVER)
- echo $(DEBSTRING)
+ @echo $(VER)
+ @echo $(DEBSTRING)
.PHONY: setup-dapper setup-sid setup-edgy setup-feisty
.PHONY: deb-dapper deb-sid deb-edgy deb-feisty
"Topic :: System :: Archiving",
]
+import re
+VSRE=re.compile("verstr=['\"]([^'\"]*)['\"]")
+verstrline=open("src/allmydata/__init__.py").readline()
+mo = VSRE.search(verstrline)
+verstr = mo.group(1)
+
setup(name='allmydata-tahoe',
- version='0.2.0b1',
+ version=verstr,
description='secure, distributed storage grid',
long_description="""Welcome to the AllMyData "tahoe" project. This project implements a
secure, distributed, fault-tolerant storage grid.
+verstr="0.2.0b1-0-UNSTABLE"
+# The line is placed above so that it can be easily read by build scripts.
+
"""
Decentralized storage grid.
# For an explanation of what the parts of the version string mean,
# please see pyutil.version.
-__version__ = Version("0.2.0b1-0-UNSTABLE")
+__version__ = Version(verstr)
# Please put a URL or other note here which shows where to get the branch of
# development from which this version grew.