[Distutils] Query distutils for directory names
Bastian Kleineidam
calvin at users.sourceforge.net
Thu Sep 23 13:40:04 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Bill,
On Mon, Sep 20, 2004 at 10:33:58AM -0600, Bill Spotz wrote:
> Is there a way to query distutils to give me the name of the lib and/or
> temp directories (i.e., on my machine,
> build/lib.darwin-7.5.0-PowerMacintosh-2.3 and
> build/temp.darwin-7.5.0-PowerMacintosh-2.3) that distutils creates
> during its build process? I can't find anything in the documentation.
The distutils.command.build class has the following variables which
might help you:
self.build_purelib
self.build_platlib
self.build_lib
self.build_temp
self.build_scripts
So you could make a subclass of the build class:
class mybuild (distutils.command.build, object):
def run (self):
super(mybuild, self).run()
print "build dir for platform-neutral modules is", self.build_purelib
setup(...
cmdclass = {'build': mybuild},
...
)
This way, you always have the correct build dir available even when the
user changes it with command line options.
Regards,
Bastian
- --
,''`. Bastian Kleineidam . calvin (at) debian.org
: :' :
`. `' GnuPG Schlüssel http://kampfwurst.net/gpgkey.txt
`-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBUrYTeBwlBDLsbz4RAoiVAKDTJveuhEuzeX0+Q+K3S3uASrkLOQCgmsrS
hXo0/WTlgoZTiRobmA7iO9A=
=TKSj
-----END PGP SIGNATURE-----
More information about the Distutils-SIG
mailing list