[Zope3-dev] Testing two Python versions at the same time
Guido van Rossum
guido@python.org
Thu, 05 Jun 2003 18:08:13 -0400
Jim discovers a trick to test a single zope3 checkout with both Python
2.2 and Python 2.3: use the "in-place" build strategy for Python 2.2,
and use the "separate build directory" approach for Python 2.3. I've
got the following changes to the Makefile, which lets me type "make
test" to test with Python 2.2, and "make test_build" to test with
Python 2.3. Very handy. Is this something to check in?
TESTFLAGS=-p -v
TESTOPTS=
SETUPFLAGS=
INPLACE_PYTHON=python2.2
BUILD_PYTHON=python2.3
# XXX What should the default be?
all: inplace
# Build in-place
inplace:
$(INPLACE_PYTHON) setup.py $(SETUPFLAGS) build_ext -i
build::
$(BUILD_PYTHON) setup.py $(SETUPFLAGS) build
test_build: build
$(BUILD_PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
test_inplace: inplace
$(INPLACE_PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
ftest_build: build
$(BUILD_PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
ftest_inplace: inplace
$(INPLACE_PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
# XXX What should the default be?
test: test_inplace
ftest: ftest_inplace
run: inplace
$(INPLACE_PYTHON) z3.py
clean:
find . \( -name '*.o' -o -name '*.so' -o -name '*.py[co]' -o -name '*.dll' \) -exec rm {} \;
rm -rf build
realclean: clean
rm -f TAGS
$(INPLACE_PYTHON) setup.py clean -a
--Guido van Rossum (home page: http://www.python.org/~guido/)