[Python-bugs-list] [Bug #129193] make clean & make test failures with setup.py

noreply@sourceforge.net noreply@sourceforge.net
Thu, 18 Jan 2001 07:16:23 -0800


Bug #129193, was updated on 2001-Jan-17 16:46
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Submitted by: montanaro
Assigned to : akuchling
Summary: make clean & make test failures with setup.py

Details: Building with setup.py has a couple problems.  First, when
executing "make clean", the .o and .so files in build/{lib,temp}* are not
deleted.  Second, when executing "make test" PYTHONPATH is not set to the
build/lib* directory, so the python executable can't import any of them.

I would try fixing this myself, but I don't know how to compute the names
of the relevant subdirectories of build.  I assume that something in
distutils computes it.  That may lead to a chicken and egg situation.  If
you want to execute "make clean" before you have a viable python executable
you won't be able to run setup.py in any fashion to compute it. 
Alternatively, you could just clean by "rm -r build/*".  If that's the only
alternative, I'd suggest canning the architecture-specific directory names
in build.



Follow-Ups:

Date: 2001-Jan-18 07:16
By: akuchling

Comment:
The big ugly python -c invocation is annoying, but I see no way around it,
since the Distutils does some work to compute the platform string; it's not
just $(MACHDEP).  A sneaky trick might be to just expand build/lib.* and
use that.

-------------------------------------------------------

Date: 2001-Jan-18 02:40
By: montanaro

Comment:
Here's a possible fix for the make test problem.

*** /tmp/Makefile.in.~1.109~	Thu Jan 18 04:38:08 2001
--- /tmp/Makefile.in	Thu Jan 18 04:38:08 2001
***************
*** 216,223 ****
  TESTPYTHON=	./python$(EXE) -tt
  test:		all
  		-rm -f $(srcdir)/Lib/test/*.py[co]
! 		-PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
! 		PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  
  # Install everything
  install:	altinstall bininstall maninstall
--- 216,223 ----
  TESTPYTHON=	./python$(EXE) -tt
  test:		all
  		-rm -f $(srcdir)/Lib/test/*.py[co]
! 		-PYTHONPATH=$(srcdir)/build/lib.`./python$(EXE) -c 'import sys ; from
distutils.util import get_platform ; print
get_platform()+"-"+sys.version[0:3]'` $(TESTPYTHON) $(TESTPROG)
$(TESTOPTS)
! 		PYTHONPATH=$(srcdir)/build/lib.`./python$(EXE) -c 'import sys ; from
distutils.util import get_platform ; print
get_platform()+"-"+sys.version[0:3]'` $(TESTPYTHON) $(TESTPROG)
$(TESTOPTS)
  
  # Install everything
  install:	altinstall bininstall maninstall

-------------------------------------------------------

Date: 2001-Jan-17 16:47
By: montanaro

Comment:
again, it's Andrew's sandbox...
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=129193&group_id=5470