From bb83d13bf720acb8d15173cc4d1484b8521f8930 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 20 Sep 2009 18:05:07 -0400 Subject: New theory about how to kit for py3k: coverage3k-* kits are for 3.x --- .hgignore | 1 - MANIFEST.in | 2 -- Makefile | 2 +- allkits.cmd | 15 +++++++-------- notsource.txt | 1 - setup.py | 10 ++++++---- three.cmd | 9 ++++----- 7 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.hgignore b/.hgignore index 23b28e38..5864cf3a 100644 --- a/.hgignore +++ b/.hgignore @@ -15,7 +15,6 @@ coverage.egg-info dist htmlcov MANIFEST -py3k setuptools-*.egg three diff --git a/MANIFEST.in b/MANIFEST.in index 5a7dcabe..ce340f66 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,8 +2,6 @@ include coverage.egg-info/*.* include coverage/*.py include coverage/htmlfiles/*.* -include py3k/*.py -include py3k/htmlfiles/*.* include ez_setup.py include setup.py include README.txt diff --git a/Makefile b/Makefile index c257be75..2c86b281 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ TEST_ZIP = test/zipmods.zip clean: python test/test_farm.py clean - -rm -rf build coverage.egg-info dist htmlcov py3k three + -rm -rf build coverage.egg-info dist htmlcov three -rm -f *.pyd */*.pyd -rm -f *.pyc */*.pyc */*/*.pyc */*/*/*.pyc */*/*/*/*.pyc */*/*/*/*/*.pyc -rm -f *.pyo */*.pyo */*/*.pyo */*/*/*.pyo */*/*/*/*.pyo */*/*/*/*/*.pyo diff --git a/allkits.cmd b/allkits.cmd index 1e4fe221..a83cac7b 100644 --- a/allkits.cmd +++ b/allkits.cmd @@ -8,19 +8,18 @@ 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 -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. +@REM Py3k cd three call \ned\bin\switchpy 31 -xcopy /s/h/i/e coverage py3k python setup.py bdist_wininst -rmdir/s/q py3k + +set TAR_OPTIONS=--group=100 +python setup.py sdist --formats=gztar +set TAR_OPTIONS= + cd .. -copy three\dist\*.exe dist +copy three\dist\*.* dist diff --git a/notsource.txt b/notsource.txt index f75dec4f..240f6644 100644 --- a/notsource.txt +++ b/notsource.txt @@ -3,6 +3,5 @@ \.hg\ \build\ \dist\ -\py3k\ \three\ .egg-info diff --git a/setup.py b/setup.py index 254c9f72..5e815a86 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ Topic :: Software Development :: Testing """ # Pull in the tools we need. -import sys +import os, sys if sys.hexversion < 0x03000000: # In Py 2.x, use setuptools. @@ -34,6 +34,7 @@ if sys.hexversion < 0x03000000: from setuptools import setup from distutils.core import Extension + package_name = 'coverage' # The 2.x sources are in coverage coverage_dir = "coverage" @@ -51,8 +52,9 @@ else: # No setuptools yet for Py 3.x, so do without. from distutils.core import setup, Extension - # The 3.x sources are in py3k - coverage_dir = "py3k" + package_name = 'coverage3k' + # The 3.x sources are in coverage + coverage_dir = "coverage" more_setup_args = dict( scripts = [ @@ -80,7 +82,7 @@ classifier_list.append("Development Status :: " + devstat) # Set it up! setup( - name = 'coverage', + name = package_name, version = __version__, packages = [ diff --git a/three.cmd b/three.cmd index 6fb56f53..aab61f20 100644 --- a/three.cmd +++ b/three.cmd @@ -5,18 +5,17 @@ xcopy /s/h/i/e /exclude:notsource.txt . ..\three move ..\three . cd three call switchpy 31 -python \python31\Tools\Scripts\2to3.py -w coverage test mock.py +python \python31\Tools\Scripts\2to3.py --write --nobackups --no-diffs coverage test mock.py + make clean make testdata -@REM We run coverage out of the source directory, so put built stuff there. -python setup.py build -copy build\lib.win32-3.1\coverage\tracer.pyd coverage +python setup.py install @REM Run both modes of tracer set COVERAGE_TEST_TRACER=c python \python31\Scripts\nosetests3 %1 -del coverage\tracer.pyd +del \python31\lib\site-packages\coverage\tracer.pyd set COVERAGE_TEST_TRACER=py python \python31\Scripts\nosetests3 %1 -- cgit v1.2.1