]>
Commit | Line | Data |
---|---|---|
4710c53d | 1 | This is versioncheck 1.0, a first stab at automatic checking of versions of\r |
2 | Python extension packages installed on your system.\r | |
3 | \r | |
4 | The basic idea is that each package contains a _checkversion.py\r | |
5 | somewhere, probably at the root level of the package. In addition, each\r | |
6 | package maintainer makes a file available on the net, through ftp or\r | |
7 | http, which contains the version number of the most recent distribution\r | |
8 | and some readable text explaining the differences with previous\r | |
9 | versions, where to download the package, etc.\r | |
10 | \r | |
11 | The checkversions.py script walks through the installed Python tree (or\r | |
12 | through a tree of choice), and runs each _checkversion.py script. These\r | |
13 | scripts retrieve the current-version file over the net, compares version\r | |
14 | numbers and tells the user about new versions of packages available.\r | |
15 | \r | |
16 | A boilerplate for the _checkversion.py file can be found here. Replace\r | |
17 | package name, version and the URL of the version-check file and put it in\r | |
18 | your distribution. In stead of a single URL you can also specify a list\r | |
19 | of URLs. Each of these will be checked in order until one is available,\r | |
20 | this is handy for distributions that live in multiple places. Put the\r | |
21 | primary distribution site (the most up-to-date site) before others.\r | |
22 | The script is executed with execfile(), not imported, and the current\r | |
23 | directory is the checkversion directory, so be careful with globals,\r | |
24 | importing, etc.\r | |
25 | \r | |
26 | The version-check file consists of an rfc822-style header followed by\r | |
27 | plaintext. The only header field checked currently is\r | |
28 | 'Current-Version:', which should contain te current version and is\r | |
29 | matched against the string contained in the _checkversion.py script.\r | |
30 | The rest of the file is human-readable text and presented to the user if\r | |
31 | there is a version mismatch. It should contain at the very least a URL\r | |
32 | of either the current distribution or a webpage describing it.\r | |
33 | \r | |
34 | Pycheckversion.py is the module that does the actual checking of versions.\r | |
35 | It should be fine where it is, it is imported by checkversion before anything\r | |
36 | else is done, but if imports fail you may want to move it to somewhere\r | |
37 | along sys.path.\r | |
38 | \r | |
39 | Jack Jansen, CWI, 23-Dec-97.\r | |
40 | <jack@cwi.nl>\r | |
41 | \r |