Mercurial > cpython-lru_cache-weakref
annotate Tools/versioncheck/README @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | 6b6ef909238e |
| children | ac192f89c109 |
| rev | line source |
|---|---|
|
6935
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 This is versioncheck 1.0, a first stab at automatic checking of versions of |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 Python extension packages installed on your system. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 The basic idea is that each package contains a _checkversion.py |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 somewhere, probably at the root level of the package. In addition, each |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 package maintainer makes a file available on the net, through ftp or |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 http, which contains the version number of the most recent distribution |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 and some readable text explaining the differences with previous |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 versions, where to download the package, etc. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 The checkversions.py script walks through the installed Python tree (or |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 through a tree of choice), and runs each _checkversion.py script. These |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 scripts retrieve the current-version file over the net, compares version |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
14 numbers and tells the user about new versions of packages available. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
15 |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
16 A boilerplate for the _checkversion.py file can be found here. Replace |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 package name, version and the URL of the version-check file and put it in |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
18 your distribution. In stead of a single URL you can also specify a list |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
19 of URLs. Each of these will be checked in order until one is available, |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
20 this is handy for distributions that live in multiple places. Put the |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
21 primary distribution site (the most up-to-date site) before others. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
22 The script is executed with execfile(), not imported, and the current |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
23 directory is the checkversion directory, so be careful with globals, |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
24 importing, etc. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
25 |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
26 The version-check file consists of an rfc822-style header followed by |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
27 plaintext. The only header field checked currently is |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
28 'Current-Version:', which should contain te current version and is |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
29 matched against the string contained in the _checkversion.py script. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 The rest of the file is human-readable text and presented to the user if |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 there is a version mismatch. It should contain at the very least a URL |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 of either the current distribution or a webpage describing it. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
33 |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
34 Pycheckversion.py is the module that does the actual checking of versions. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
35 It should be fine where it is, it is imported by checkversion before anything |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
36 else is done, but if imports fail you may want to move it to somewhere |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 along sys.path. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
39 Jack Jansen, CWI, 23-Dec-97. |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
40 <jack@cwi.nl> |
|
6b6ef909238e
Adding Jack Jansen's version checking utility.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
41 |
