From ba911dc01d1a033398f77a7ad69381b28a8e71b7 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 18 Sep 2009 07:51:08 -0400 Subject: Py3k kitting. --- .hgignore | 2 ++ MANIFEST.in | 2 ++ Makefile | 5 +---- allkits.cmd | 11 +++++++++++ notsource.txt | 4 ++++ setup.py | 10 ++++++++++ three.cmd | 7 +++++-- 7 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.hgignore b/.hgignore index 3716b4f1..23b28e38 100644 --- a/.hgignore +++ b/.hgignore @@ -15,7 +15,9 @@ coverage.egg-info dist htmlcov MANIFEST +py3k setuptools-*.egg +three # Stuff in the test directory. zipmods.zip diff --git a/MANIFEST.in b/MANIFEST.in index ce340f66..5a7dcabe 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,8 @@ 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 c747d133..c257be75 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,7 @@ TEST_ZIP = test/zipmods.zip clean: python test/test_farm.py clean - -rm -rf build - -rm -rf coverage.egg-info - -rm -rf dist - -rm -rf htmlcov + -rm -rf build coverage.egg-info dist htmlcov py3k 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 26d00611..4d537273 100644 --- a/allkits.cmd +++ b/allkits.cmd @@ -1,3 +1,4 @@ +@REM Build all the kits for coverage.py call \ned\bin\switchpy 23 python setup.py bdist_wininst call \ned\bin\switchpy 24 @@ -6,6 +7,16 @@ call \ned\bin\switchpy 25 python setup.py bdist_wininst call \ned\bin\switchpy 26 python setup.py bdist_wininst + +del /q py3k\*.* +mkdir py3k +copy three\coverage\*.py py3k set TAR_OPTIONS=--group=100 python setup.py sdist --formats=gztar set TAR_OPTIONS= + +cd three +call \ned\bin\switchpy 31 +python setup.py bdist_wininst +cd .. +copy three\dist\*.exe dist diff --git a/notsource.txt b/notsource.txt index a037cd17..f75dec4f 100644 --- a/notsource.txt +++ b/notsource.txt @@ -1,4 +1,8 @@ .pyc +.pyd \.hg\ \build\ +\dist\ +\py3k\ +\three\ .egg-info diff --git a/setup.py b/setup.py index dba86df5..12aa631c 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,9 @@ if sys.hexversion < 0x03000000: from setuptools import setup from distutils.core import Extension + # The 2.x sources are in coverage + coverage_dir = "coverage" + more_setup_args = dict( entry_points = { 'console_scripts': [ @@ -46,6 +49,9 @@ else: # No setuptools yet for Py 3.x, so do without. from distutils.core import setup, Extension + # The 2.x sources are in py3k + coverage_dir = "py3k" + more_setup_args = dict( scripts = [ 'scripts/coverage', @@ -79,6 +85,10 @@ setup( 'coverage', ], + package_dir = { + 'coverage': coverage_dir, + }, + package_data = { 'coverage': [ 'htmlfiles/*.*', diff --git a/three.cmd b/three.cmd index 93dd8f9d..61ef3745 100644 --- a/three.cmd +++ b/three.cmd @@ -2,9 +2,10 @@ rmdir/s/q ..\three xcopy /s/h/i/e /exclude:notsource.txt . ..\three -cd ..\three +move ..\three . +cd three call switchpy 31 -python \python31\Tools\Scripts\2to3.py -w coverage test setup.py mock.py +python \python31\Tools\Scripts\2to3.py -w coverage test mock.py make clean make testdata @@ -18,3 +19,5 @@ python \python31\Scripts\nosetests3 %1 del coverage\tracer.pyd set COVERAGE_TEST_TRACER=py python \python31\Scripts\nosetests3 %1 + +cd .. -- cgit v1.2.1