]> granicus.if.org Git - python/commitdiff
Patch #103313: Fixes "make test" by adding a little file named
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 18 Jan 2001 21:20:56 +0000 (21:20 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 18 Jan 2001 21:20:56 +0000 (21:20 +0000)
    "platform", running the Python binary to create it, and then
    using it to set PYTHONPATH.

Makefile.in

index 48d3f0cc90c80c8932577fca17f4cbd1ae7d1605..eee92b42af25ba001a49f173691e7b156f0cb520 100644 (file)
@@ -155,6 +155,9 @@ Modules/python.o: $(srcdir)/Modules/python.c
 buildno:
                echo 0 >buildno
 
+platform: python$(EXE)
+       ./python$(EXE) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
+
 # Build the shared modules
 sharedmods:    python$(EXE)
                ./python$(EXE) $(srcdir)/setup.py build
@@ -215,10 +218,10 @@ Modules:  Parser Python Objects
 TESTOPTS=      -l
 TESTPROG=      $(srcdir)/Lib/test/regrtest.py
 TESTPYTHON=    ./python$(EXE) -tt
-test:          all
+test:          all platform
                -rm -f $(srcdir)/Lib/test/*.py[co]
-               -PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-               PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+               -PYTHONPATH=$(srcdir)/build/lib.`cat platform` $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+               PYTHONPATH=$(srcdir)/build/lib.`cat platform` $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
 
 # Install everything
 install:       altinstall bininstall maninstall
@@ -541,7 +544,7 @@ distclean:  clobber
                -$(MAKE) -f $(srcdir)/Makefile.in \
                        SUBDIRS="$(SUBDIRSTOO)" clobber
                -rm -f config.status config.log config.cache config.h Makefile
-               -rm -f buildno
+               -rm -f buildno platform
                -rm -f Modules/Makefile
                -for i in $(SUBDIRS) $(SUBDIRSTOO); do \
                         for f in $$i/*.in; do \