Ned Batchelder avatar Ned Batchelder committed df98f5b

Put __version__ back in the main file, and also put the URL in only one place, use it everywhere.

Comments (0)

Files changed (6)

coverage/__init__.py

 
 """
 
-from coverage.version import __version__
+__version__ = "3.1b1"    # see detailed history in CHANGES.txt
+
+__url__ = "http://nedbatchelder.com/code/coverage"
+
 from coverage.control import coverage
 from coverage.data import CoverageData
 from coverage.cmdline import main, CoverageScript
 """HTML reporting for Coverage."""
 
 import keyword, os, re, token, tokenize, shutil
-from coverage import __version__    # pylint: disable-msg=W0611
+from coverage import __url__, __version__    # pylint: disable-msg=W0611
 from coverage.backward import StringIO   # pylint: disable-msg=W0622
 from coverage.report import Reporter
 from coverage.templite import Templite

coverage/htmlfiles/index.html

 <div id='footer'>
     <div class='content'>
         <p>
-            <a class='nav' href='http://nedbatchelder.com/code/coverage'>coverage v{{__version__}}</a>
+            <a class='nav' href='{{__url__}}'>coverage.py v{{__version__}}</a>
         </p>
     </div>
 </div>

coverage/version.py

-"""Coverage.py version number."""
-
-# Because this file is imported by setup.py, which must run unchanged in both
-# Python 2.x and 3.x, this file must be kept simple enough to run under both.
-
-__version__ = "3.1b1"    # see detailed history in CHANGES.txt

coverage/xmlreport.py

 import os, sys
 import xml.dom.minidom
 
-from coverage import __version__
+from coverage import __url__, __version__
 from coverage.backward import sorted            # pylint: disable-msg=W0622
 from coverage.report import Reporter
 
         root = self.xml_out.documentElement
 
         root.appendChild(self.xml_out.createComment(
-            " Generated by coverage.py %s: "
-            "http://nedbatchelder.com/code/coverage " % __version__
+            " Generated by coverage.py %s: %s " % (__version__, __url__)
             ))
         packageXml = self.xml_out.createElement("packages")
         root.appendChild(packageXml)
 
 # Get or massage our metadata.
 
-from coverage.version import __version__
+from coverage import __url__, __version__
 
 doclines = __doc__.split('\n')
 
     keywords = 'code coverage testing',
     license = 'BSD',
     classifiers = classifier_list,
-    url = 'http://nedbatchelder.com/code/coverage',
+    url = __url__,
     
     **more_setup_args
 )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.