From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Tue, 5 Oct 2010 18:23:50 +0000 (-0700)
Subject: setup: add --multi-version to the "setup.py develop" command-line
X-Git-Tag: trac-4800~50
X-Git-Url: https://git.rkrishnan.org/%5B/simplejson/encoder.py.html?a=commitdiff_plain;h=98ffbfb31faccdaf65b56bcd608110d87ef39e7b;p=tahoe-lafs%2Ftahoe-lafs.git

setup: add --multi-version to the "setup.py develop" command-line
fixes #530. I earlier tried this twice (see #530 for history) and then twice rolled it back due to some problems that arose. However, I didn't write down what the problems were in enough detail on the ticket that I can tell today whether those problems are still issues, so here goes the third attempt. (I did write down on the ticket that it would not create site.py or .pth files in the target directory with --multi-version mode, but I didn't explain why *that* was a problem.)
---

diff --git a/setup.cfg b/setup.cfg
index 41e20daf..a9ccb4be 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -37,7 +37,7 @@ find_links=misc/dependencies tahoe-deps ../tahoe-deps
 # (See http://tahoe-lafs.org/trac/tahoe-lafs/ticket/142 .)
 
 [aliases]
-build = darcsver --count-all-patches develop --prefix=support make_executable build
+build = darcsver --count-all-patches develop --multi-version --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
diff --git a/src/allmydata/scripts/keygen.py b/src/allmydata/scripts/keygen.py
index f96b3a76..c1d09786 100644
--- a/src/allmydata/scripts/keygen.py
+++ b/src/allmydata/scripts/keygen.py
@@ -14,6 +14,9 @@ class CreateKeyGeneratorOptions(BasedirMixin, BaseOptions):
 keygen_tac = """
 # -*- python -*-
 
+import pkg_resources
+pkg_resources.require('allmydata-tahoe')
+
 from allmydata import key_generator
 from twisted.application import service