summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.txt2
-rw-r--r--allkits.cmd6
-rw-r--r--coverage/__init__.py3
-rw-r--r--coverage/version.py6
-rw-r--r--setup.py6
-rw-r--r--three.cmd2
6 files changed, 18 insertions, 7 deletions
diff --git a/TODO.txt b/TODO.txt
index 2b22bb35..7c63f142 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -176,7 +176,7 @@ x Tests about the "import __main__" in cmdline.py
- Ubuntu
- Mac
- Pythons 2.3, 2.4, 2.5, 2.6
-- Version number in coverage/__init__.py:__version__
+- Version number in coverage/version.py
- 3.1a1, 3.1b1, 3.1c1, 3.1
- Update CHANGES, including release date.
- Update docs
diff --git a/allkits.cmd b/allkits.cmd
index 4d537273..1e4fe221 100644
--- a/allkits.cmd
+++ b/allkits.cmd
@@ -8,15 +8,19 @@ python setup.py bdist_wininst
call \ned\bin\switchpy 26
python setup.py bdist_wininst
+@REM Source kit: Py2k in "coverage", Py3k in "py3k"
del /q py3k\*.*
mkdir py3k
-copy three\coverage\*.py py3k
+xcopy /s/h/i/e /exclude:notsource.txt three\coverage\*.py py3k
set TAR_OPTIONS=--group=100
python setup.py sdist --formats=gztar
set TAR_OPTIONS=
+@REM py3k windows kit: code still needs to be in py3k, so move it.
cd three
call \ned\bin\switchpy 31
+xcopy /s/h/i/e coverage py3k
python setup.py bdist_wininst
+rmdir/s/q py3k
cd ..
copy three\dist\*.exe dist
diff --git a/coverage/__init__.py b/coverage/__init__.py
index 0f8a0cc0..21894364 100644
--- a/coverage/__init__.py
+++ b/coverage/__init__.py
@@ -5,8 +5,7 @@ http://nedbatchelder.com/code/coverage
"""
-__version__ = "3.1b1" # see detailed history in CHANGES.txt
-
+from coverage.version import __version__
from coverage.control import coverage
from coverage.data import CoverageData
from coverage.cmdline import main, CoverageScript
diff --git a/coverage/version.py b/coverage/version.py
new file mode 100644
index 00000000..45f1b328
--- /dev/null
+++ b/coverage/version.py
@@ -0,0 +1,6 @@
+"""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
diff --git a/setup.py b/setup.py
index 12aa631c..254c9f72 100644
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,8 @@ Code repository and issue tracker are at
"""
+# This file is used unchanged under all versions of Python, 2.x and 3.x.
+
classifiers = """
Environment :: Console
Intended Audience :: Developers
@@ -49,7 +51,7 @@ else:
# No setuptools yet for Py 3.x, so do without.
from distutils.core import setup, Extension
- # The 2.x sources are in py3k
+ # The 3.x sources are in py3k
coverage_dir = "py3k"
more_setup_args = dict(
@@ -61,7 +63,7 @@ else:
# Get or massage our metadata.
-from coverage import __version__
+from coverage.version import __version__
doclines = __doc__.split('\n')
diff --git a/three.cmd b/three.cmd
index 61ef3745..6fb56f53 100644
--- a/three.cmd
+++ b/three.cmd
@@ -1,6 +1,6 @@
@REM Copy the sources, convert to Py3k, and run the tests.
-rmdir/s/q ..\three
+rmdir /s/q three ..\three
xcopy /s/h/i/e /exclude:notsource.txt . ..\three
move ..\three .
cd three