1 patch for repository zooko@dev.allmydata.org:/home/darcs/tahoe-lafs/trunk: Sun Aug 1 10:05:17 MDT 2010 zooko@zooko.com * setup: replace hardcoded 'allmydata-tahoe' with allmydata.__appname__ New patches: [setup: replace hardcoded 'allmydata-tahoe' with allmydata.__appname__ zooko@zooko.com**20100801160517 Ignore-this: 55e1a98515300d228f02df10975f7ba ] { hunk ./_auto_deps.py 111 # VersionConflict error instead of DistributionNotFound. pass -def get_package_versions_from_setuptools(): - import pkg_resources - return dict([(p.project_name, (p.version, p.location)) for p in pkg_resources.require('allmydata-tahoe')]) - hunk ./src/allmydata/__init__.py 168 else: return platform.platform() +def get_package_versions_from_setuptools(): + import pkg_resources + return dict([(p.project_name, (p.version, p.location)) for p in pkg_resources.require(__appname__)]) + def get_package_versions_and_locations(): # because there are a few dependencies that are outside setuptools's ken # (Python and platform, and sqlite3 if you are on Python >= 2.5), and hunk ./src/allmydata/__init__.py 199 d1 = { 'pyOpenSSL': (OpenSSL.__version__, os.path.dirname(OpenSSL.__file__)), - 'allmydata-tahoe': (allmydata.__version__, os.path.dirname(allmydata.__file__)), + __appname__: (allmydata.__version__, os.path.dirname(allmydata.__file__)), 'foolscap': (foolscap.api.__version__, os.path.dirname(foolscap.__file__)), 'Nevow': (nevow.__version__, os.path.dirname(nevow.__file__)), 'pycryptopp': (pycryptopp.__version__, os.path.dirname(pycryptopp.__file__)), hunk ./src/allmydata/__init__.py 217 # But we prefer to get all the dependencies as known by setuptools: import pkg_resources try: - d2 = _auto_deps.get_package_versions_from_setuptools() + d2 = get_package_versions_from_setuptools() except pkg_resources.DistributionNotFound: # See docstring in _auto_deps.require_auto_deps() to explain why it makes sense to ignore this exception. pass hunk ./src/allmydata/__init__.py 235 def get_package_versions_string(show_paths=False): vers_and_locs = get_package_versions_and_locations() res = [] - for p in ["allmydata-tahoe", "foolscap", "pycryptopp", "zfec", "Twisted", "Nevow", "zope.interface", "python", "platform"]: + for p in [__appname__, "foolscap", "pycryptopp", "zfec", "Twisted", "Nevow", "zope.interface", "python", "platform"]: (ver, loc) = vers_and_locs.get(p, ('UNKNOWN', 'UNKNOWN')) info = str(p) + ": " + str(ver) if show_paths: hunk ./src/allmydata/test/test_client.py 163 self.failUnless("." in str(allmydata.__full_version__), "non-numeric version in '%s'" % allmydata.__version__) all_versions = allmydata.get_package_versions_string() - self.failUnless("allmydata-tahoe" in all_versions) + self.failUnless(allmydata.__appname__ in all_versions) log.msg("tahoe versions: %s" % all_versions) # also test stats stats = c.get_stats() hunk ./src/allmydata/test/test_runner.py 42 out, err, rc_or_sig = res self.failUnlessEqual(rc_or_sig, 0, str((out, err, rc_or_sig))) - # Fail unless the allmydata-tahoe package is *this* version *and* - # was loaded from *this* source directory. + # Fail unless the package is *this* version *and* was loaded from *this* source directory. ad = os.path.dirname(os.path.dirname(os.path.realpath(allmydata.__file__))) hunk ./src/allmydata/test/test_runner.py 44 - required_ver_and_path = "allmydata-tahoe: %s (%s)" % (allmydata.__version__, ad) + required_ver_and_path = "%s: %s (%s)" % (allmydata.__appname__, allmydata.__version__, ad) self.failUnless(out.startswith(required_ver_and_path), (out, err, rc_or_sig, required_ver_and_path)) d.addCallback(_cb) hunk ./src/allmydata/test/test_runner.py 62 def _cb(res): out, err, rc_or_sig = res self.failUnlessEqual(rc_or_sig, 0, res) - self.failUnless(out.startswith("allmydata-tahoe:"), res) + self.failUnless(out.startswith(allmydata.__appname__), res) self.failIfIn("DeprecationWarning", out, res) self.failUnlessEqual(err, "", res) d.addCallback(_cb) hunk ./src/allmydata/test/test_system.py 753 d = getPage(self.introweb_url, method="GET", followRedirect=True) def _check(res): try: - self.failUnless("allmydata-tahoe: %s" % str(allmydata.__version__) + self.failUnless("%s: %s" % (allmydata.__appname__, allmydata.__version__) in res) self.failUnless("Announcement Summary: storage: 5, stub_client: 5" in res) self.failUnless("Subscription Summary: storage: 5" in res) } Context: [docs: add Jacob Lyles to CREDITS zooko@zooko.com**20100730230500 Ignore-this: 9dbbd6a591b4b1a5a8dcb69b7b757792 ] [web: don't use %d formatting on a potentially large negative float -- there is a bug in Python 2.5 in that case jacob.lyles@gmail.com**20100730220550 Ignore-this: 7080eb4bddbcce29cba5447f8f4872ee fixes #1055 ] [docs: fix licensing typo that was earlier fixed in [20090921164651-92b7f-7f97b58101d93dc588445c52a9aaa56a2c7ae336] zooko@zooko.com**20100729052923 Ignore-this: a975d79115911688e5469d4d869e1664 I wish we didn't copies of this licensing text in several different files so that changes can be accidentally omitted from some of them. ] [misc/build_helpers/run-with-pythonpath.py: fix stale comment, and remove 'trial' example that is not the right way to run trial. david-sarah@jacaranda.org**20100726225729 Ignore-this: a61f55557ad69a1633bfb2b8172cce97 ] [docs/specifications/dirnodes.txt: 'mesh'->'grid'. david-sarah@jacaranda.org**20100723061616 Ignore-this: 887bcf921ef00afba8e05e9239035bca ] [docs/specifications/dirnodes.txt: bring layer terminology up-to-date with architecture.txt, and a few other updates (e.g. note that the MAC is no longer verified, and that URIs can be unknown). Also 'Tahoe'->'Tahoe-LAFS'. david-sarah@jacaranda.org**20100723054703 Ignore-this: f3b98183e7d0a0f391225b8b93ac6c37 ] [__init__.py: silence DeprecationWarning about BaseException.message globally. fixes #1129 david-sarah@jacaranda.org**20100720011939 Ignore-this: 38808986ba79cb2786b010504a22f89 ] [test_runner: test that 'tahoe --version' outputs no noise (e.g. DeprecationWarnings). david-sarah@jacaranda.org**20100720011345 Ignore-this: dd358b7b2e5d57282cbe133e8069702e ] [docs: use current cap to Zooko's wiki page in example text zooko@zooko.com**20100721010543 Ignore-this: 4f36f36758f9fdbaf9eb73eac23b6652 fixes #1134 ] [TAG allmydata-tahoe-1.7.1 zooko@zooko.com**20100719131352 Ignore-this: 6942056548433dc653a746703819ad8c ] Patch bundle hash: 322a7c60f2df520e6ebe4fdb2a5c5b30e09d0eb2