[Distutils] build_lib

Paul Prescod paul at prescod.net
Wed Jan 21 12:44:24 EST 2004


I'm having trouble in my code spelunking. Where does 
distutils.command.build_ext.build_ext get its build_platlib from? I'm 
guessing it is somewhere in distutils.command.build but there are two 
reasons I am confused.

1. Sometimes you invoke build_ext directly from the command line. Does a 
build object ever get created?

2. I can't find where the variable is passed explicitly. Maybe as part 
of some dictionary?

Really, all I want to do is:

python Setup.py build_ext --build-base=/tmp/junk

But it won't work becaus build-base is defined on "build", not "build_ext".

I could use the more specific "--build-lib" option but I like the way 
distutils lays out its directory. I just want to BOTH do a direct 
build_ext (rather than a higher level build) AND have control over the 
build-base. In the end it is going into a directory named "build" 
anyway, just not one in the current directory.

  Paul Prescod





More information about the Distutils-SIG mailing list