Good morning, I'm using distutils to package a tool, and I was thinking that it would be very useful to have the self.install_lib variable returned in some way to the user in the setup.py script, after the call of setup(). In that way the user could automate the creation of the .pth file in order to add the installed module folder to the python search path. This is useful when the user wants to create a stand-alone package, working out of the box when unzipping it, without installation in the system site-packages/ folder. The folder name used for the installation is written out on the screen at line 615 of the HEAD of Install.py: === log.debug(("modules installed to '%s', which is not in " "Python's module search path (sys.path) -- " "you'll have to change the search path yourself"), self.install_lib) === So in some ways we could grab it from there and return it to the user. Many thanks for your kind attention, Best regards,
On Thu, Jan 21, 2010 at 11:30 AM, Riccardo-Maria BIANCHI
I'm using distutils to package a tool, and I was thinking that it would be very useful to have the self.install_lib variable returned in some way to the user in the setup.py script, after the call of setup().
setup() returns the distribution object, which have a get_command_obj() function you can call to get back to the commands that were run, therefore their options. But I don't think you want to do this just to be able to run a standalone distribution. You can change the PYTHONPATH environment variable for what you need, *or* use Distribute/Setuptools' "develop" command, that allows you to run a distribution "inplace". It creates a special file in site-package that is comparable to a symbolic link pointing to your project. Regards Tarek -- Tarek Ziadé | http://ziade.org