I have attached a patch against CVS to expand the functionality of the tarball formats in the sdist and bdist commands. It adds the following: Adds bztar format to generate .tar.bz2 tarballs Uses the -f argument to overright old tarballs automatically, I am assuming that if the old tarball was wanted it would have been moved or else the version number would have been changed. Uses the -9 argument to bzip2 and gzip to use maximum compression. Compress uses the maximum compression by default. Tests for correct value for the 'compress' argument of make_tarball. This is one less place for someone adding new compression programs to forget to change. I have a patch (but not attached) which detects if tar is GNU tar > 1.13, but I do not know if I should submit it because it depends on the Unix-only popen2 module. Can it be assumed that only Unix users will generate tarballs, and if this assumption can be made should I submit the patch? In any case, I don't know very much about tar, so someone else would have to put the information to use after it is detected. -- Harry Henry Gebel, Senior Developer, Landon House SBS West Dover Hundred, Delaware "Why do you look for the living among the dead? He is not here, but has risen." Luke 24:5 (NRSV)
On 24 April 2000, Harry Henry Gebel said:
I have attached a patch against CVS to expand the functionality of the tarball formats in the sdist and bdist commands. It adds the following:
Cool, thanks! Just checked it in. Great, now at least 0.8.2 has more reasons to exist than my paper-bag-over-head bugs.
I have a patch (but not attached) which detects if tar is GNU tar > 1.13, but I do not know if I should submit it because it depends on the Unix-only popen2 module. Can it be assumed that only Unix users will generate tarballs, and if this assumption can be made should I submit the patch? In any case, I don't know very much about tar, so someone else would have to put the information to use after it is detected.
Cool, send it in. Easy solution to the portability problem: if hasattr (os, "pipe"): # use popen2 to detect GNU tar 1.13 else: # assume primitive tar Did you finish the job and hack up "sdist" to use the new base dir option (whatever it is)? If not, go ahead and submit just the detect patch -- optionally eliminating the build-tree-of-hard-links step really should be a distinct patch. Greg -- Greg Ward - Unix geek gward@python.net http://starship.python.net/~gward/ I have many CHARTS and DIAGRAMS ...
if hasattr (os, "pipe"): # use popen2 to detect GNU tar 1.13 else: # assume primitive tar
Did you finish the job and hack up "sdist" to use the new base dir option (whatever it is)? If not, go ahead and submit just the detect patch -- optionally eliminating the build-tree-of-hard-links step really should be a distinct patch.
Greg
The patch was a washout, it didn't save any time and made the code harder to understand. I liked it at two in the morning, but after looking at it when I was wide awake I think the current way is better. -- Harry Henry Gebel, Senior Developer, Landon House SBS West Dover Hundred, Delaware "Why do you look for the living among the dead? He is not here, but has risen." Luke 24:5 (NRSV)
On 24 April 2000, Harry Henry Gebel said:
The patch was a washout, it didn't save any time and made the code harder to understand. I liked it at two in the morning, but after looking at it when I was wide awake I think the current way is better.
Okee-dokey. If anyone's interested, it would still be mildly interesting and useful to detect GNU tar and use the -z option, and to detect GNU tar >= 1.13 and use the "base directory" option. Not essential, but it's one of those things that makes the Distutils look smarter, so I like it. ;-) Greg -- Greg Ward - Unix geek gward@python.net http://starship.python.net/~gward/ Don't hate yourself in the morning -- sleep till noon.
Greg Ward writes:
Okee-dokey. If anyone's interested, it would still be mildly interesting and useful to detect GNU tar and use the -z option, and to detect GNU tar >= 1.13 and use the "base directory" option. Not essential, but it's one of those things that makes the Distutils look
Sounds like extraneous cruft to me. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
participants (3)
-
Fred L. Drake, Jr.
-
Greg Ward
-
Harry Henry Gebel