If anyone is interested, I have implemented an "install" program compatable with the GNU version, excepting internalization and a bug I think is in their code. I placed a copy at ftp://starship.python.net/pub/crew/dalke/install.py for your enjoyment. It uses the Python license, which is doable since I never looked at the GNU source code. Its reason for being is that I think it could be useful for the distutils-sig, and because we (my company) needs something like it for distributing our own software on different platforms not all of which will have "install", and because, well, because it was there. I've tested it pretty well; not fully, but enough that I'm having problems coming up with new test cases. 'Course, now that I've finished that project I started looking at Greg Ward's initial distutils CVS distribution, and I see we have some overlap, though I like my "_mkdir" over his "mkpath", and I now understand why he copied and modified shutil.copy :) Andrew dalke@bioreason.com
Quoth Andrew Dalke, on 23 March 1999:
If anyone is interested, I have implemented an "install" program compatable with the GNU version, excepting internalization and a bug I think is in their code. I placed a copy at ftp://starship.python.net/pub/crew/dalke/install.py for your enjoyment. It uses the Python license, which is doable since I never looked at the GNU source code.
Cool! I don't *think* it's directly applicable to Distutils; a quick look at the code reveals what that my suspicious are true: the bulk of the work is in parsing the command-line options and symbolic mode. It's good to know this code is "out there" in Python, but I don't *think* it'll be needed for the Distutils. Andrew, since you've looked at my code you can probably see that my general approach is to put this sort of functionality into smallish functions in the distutils.util module. (Eventually this will probably have to be split into multiple modules, but for now it's manageable.) When something can be easily implemented in Python -- copying files or making directory trees -- then I say, "Do it in Python!". Don't screw around with running external utilities whose behaviour (or even presence) is unlikely to be consistent across platforms, especially when you consider the Mac. That said, I consider the fact that you announced your utility to this list as licence to rip off bits of your code and put them into distutils.util. There's more than one way to reuse code... Aside: I bet your install.py is a damn sight faster than the install-sh distributed with autoconf, and thus with Python. Might be nice to use it instead of install-sh when installing Python. (Of course, it would be even nicer if Python could install itself with the functions in distutils.util, but that's a ways down the road yet... ;-) Greg -- Greg Ward - software developer gward@cnri.reston.va.us Corporation for National Research Initiatives 1895 Preston White Drive voice: +1-703-620-8990 x287 Reston, Virginia, USA 20191-5434 fax: +1-703-620-0913
participants (2)
-
Andrew Dalke
-
Greg Ward