Ticket #1146: allmydata_appname.dpatch.txt

File allmydata_appname.dpatch.txt, 6.9 KB (added by zooko, at 2010-08-01T16:25:06Z)
Line 
11 patch for repository zooko@dev.allmydata.org:/home/darcs/tahoe-lafs/trunk:
2
3Sun Aug  1 10:05:17 MDT 2010  zooko@zooko.com
4  * setup: replace hardcoded 'allmydata-tahoe' with allmydata.__appname__
5
6New patches:
7
8[setup: replace hardcoded 'allmydata-tahoe' with allmydata.__appname__
9zooko@zooko.com**20100801160517
10 Ignore-this: 55e1a98515300d228f02df10975f7ba
11] {
12hunk ./_auto_deps.py 111
13             # VersionConflict error instead of DistributionNotFound.
14             pass
15 
16-def get_package_versions_from_setuptools():
17-    import pkg_resources
18-    return dict([(p.project_name, (p.version, p.location)) for p in pkg_resources.require('allmydata-tahoe')])
19-
20hunk ./src/allmydata/__init__.py 168
21     else:
22         return platform.platform()
23 
24+def get_package_versions_from_setuptools():
25+    import pkg_resources
26+    return dict([(p.project_name, (p.version, p.location)) for p in pkg_resources.require(__appname__)])
27+
28 def get_package_versions_and_locations():
29     # because there are a few dependencies that are outside setuptools's ken
30     # (Python and platform, and sqlite3 if you are on Python >= 2.5), and
31hunk ./src/allmydata/__init__.py 199
32 
33     d1 = {
34         'pyOpenSSL': (OpenSSL.__version__, os.path.dirname(OpenSSL.__file__)),
35-        'allmydata-tahoe': (allmydata.__version__, os.path.dirname(allmydata.__file__)),
36+        __appname__: (allmydata.__version__, os.path.dirname(allmydata.__file__)),
37         'foolscap': (foolscap.api.__version__, os.path.dirname(foolscap.__file__)),
38         'Nevow': (nevow.__version__, os.path.dirname(nevow.__file__)),
39         'pycryptopp': (pycryptopp.__version__, os.path.dirname(pycryptopp.__file__)),
40hunk ./src/allmydata/__init__.py 217
41     # But we prefer to get all the dependencies as known by setuptools:
42     import pkg_resources
43     try:
44-        d2 = _auto_deps.get_package_versions_from_setuptools()
45+        d2 = get_package_versions_from_setuptools()
46     except pkg_resources.DistributionNotFound:
47         # See docstring in _auto_deps.require_auto_deps() to explain why it makes sense to ignore this exception.
48         pass
49hunk ./src/allmydata/__init__.py 235
50 def get_package_versions_string(show_paths=False):
51     vers_and_locs = get_package_versions_and_locations()
52     res = []
53-    for p in ["allmydata-tahoe", "foolscap", "pycryptopp", "zfec", "Twisted", "Nevow", "zope.interface", "python", "platform"]:
54+    for p in [__appname__, "foolscap", "pycryptopp", "zfec", "Twisted", "Nevow", "zope.interface", "python", "platform"]:
55         (ver, loc) = vers_and_locs.get(p, ('UNKNOWN', 'UNKNOWN'))
56         info = str(p) + ": " + str(ver)
57         if show_paths:
58hunk ./src/allmydata/test/test_client.py 163
59         self.failUnless("." in str(allmydata.__full_version__),
60                         "non-numeric version in '%s'" % allmydata.__version__)
61         all_versions = allmydata.get_package_versions_string()
62-        self.failUnless("allmydata-tahoe" in all_versions)
63+        self.failUnless(allmydata.__appname__ in all_versions)
64         log.msg("tahoe versions: %s" % all_versions)
65         # also test stats
66         stats = c.get_stats()
67hunk ./src/allmydata/test/test_runner.py 42
68             out, err, rc_or_sig = res
69             self.failUnlessEqual(rc_or_sig, 0, str((out, err, rc_or_sig)))
70 
71-            # Fail unless the allmydata-tahoe package is *this* version *and*
72-            # was loaded from *this* source directory.
73+            # Fail unless the package is *this* version *and* was loaded from *this* source directory.
74             ad = os.path.dirname(os.path.dirname(os.path.realpath(allmydata.__file__)))
75hunk ./src/allmydata/test/test_runner.py 44
76-            required_ver_and_path = "allmydata-tahoe: %s (%s)" % (allmydata.__version__, ad)
77+            required_ver_and_path = "%s: %s (%s)" % (allmydata.__appname__, allmydata.__version__, ad)
78             self.failUnless(out.startswith(required_ver_and_path),
79                             (out, err, rc_or_sig, required_ver_and_path))
80         d.addCallback(_cb)
81hunk ./src/allmydata/test/test_runner.py 62
82         def _cb(res):
83             out, err, rc_or_sig = res
84             self.failUnlessEqual(rc_or_sig, 0, res)
85-            self.failUnless(out.startswith("allmydata-tahoe:"), res)
86+            self.failUnless(out.startswith(allmydata.__appname__), res)
87             self.failIfIn("DeprecationWarning", out, res)
88             self.failUnlessEqual(err, "", res)
89         d.addCallback(_cb)
90hunk ./src/allmydata/test/test_system.py 753
91         d = getPage(self.introweb_url, method="GET", followRedirect=True)
92         def _check(res):
93             try:
94-                self.failUnless("allmydata-tahoe: %s" % str(allmydata.__version__)
95+                self.failUnless("%s: %s" % (allmydata.__appname__, allmydata.__version__)
96                                 in res)
97                 self.failUnless("Announcement Summary: storage: 5, stub_client: 5" in res)
98                 self.failUnless("Subscription Summary: storage: 5" in res)
99}
100
101Context:
102
103[docs: add Jacob Lyles to CREDITS
104zooko@zooko.com**20100730230500
105 Ignore-this: 9dbbd6a591b4b1a5a8dcb69b7b757792
106]
107[web: don't use %d formatting on a potentially large negative float -- there is a bug in Python 2.5 in that case
108jacob.lyles@gmail.com**20100730220550
109 Ignore-this: 7080eb4bddbcce29cba5447f8f4872ee
110 fixes #1055
111]
112[docs: fix licensing typo that was earlier fixed in [20090921164651-92b7f-7f97b58101d93dc588445c52a9aaa56a2c7ae336]
113zooko@zooko.com**20100729052923
114 Ignore-this: a975d79115911688e5469d4d869e1664
115 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.
116]
117[misc/build_helpers/run-with-pythonpath.py: fix stale comment, and remove 'trial' example that is not the right way to run trial.
118david-sarah@jacaranda.org**20100726225729
119 Ignore-this: a61f55557ad69a1633bfb2b8172cce97
120]
121[docs/specifications/dirnodes.txt: 'mesh'->'grid'.
122david-sarah@jacaranda.org**20100723061616
123 Ignore-this: 887bcf921ef00afba8e05e9239035bca
124]
125[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'.
126david-sarah@jacaranda.org**20100723054703
127 Ignore-this: f3b98183e7d0a0f391225b8b93ac6c37
128]
129[__init__.py: silence DeprecationWarning about BaseException.message globally. fixes #1129
130david-sarah@jacaranda.org**20100720011939
131 Ignore-this: 38808986ba79cb2786b010504a22f89
132]
133[test_runner: test that 'tahoe --version' outputs no noise (e.g. DeprecationWarnings).
134david-sarah@jacaranda.org**20100720011345
135 Ignore-this: dd358b7b2e5d57282cbe133e8069702e
136]
137[docs: use current cap to Zooko's wiki page in example text
138zooko@zooko.com**20100721010543
139 Ignore-this: 4f36f36758f9fdbaf9eb73eac23b6652
140 fixes #1134
141]
142[TAG allmydata-tahoe-1.7.1
143zooko@zooko.com**20100719131352
144 Ignore-this: 6942056548433dc653a746703819ad8c
145]
146Patch bundle hash:
147322a7c60f2df520e6ebe4fdb2a5c5b30e09d0eb2