Home | History | Annotate | only in /external/python/cpython2/Tools/versioncheck
Up to higher level directory
NameDateSize
_checkversion.py22-Oct-2020430
checkversions.py22-Oct-20201.4K
pyversioncheck.py22-Oct-20204K
README22-Oct-20202.1K

README

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