You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make clean fails to delete .a and .so.X.Y files #48257
The "clean" target in the makefile fails to delete the libpython.a file
and the libpython.so.X.Y file (should you have configured using
--enable-shared). The attached trivial patch solves that problem.
The patch is against the trunk as of just before the 2.6 final release.
It will almost certainly apply cleanly to the py3k version as well.
Skip, was there a patch here? I can't find it in the bug lists, so I think we both missed it?
Pinging Martin in case the tracker ate the patch :)
loewis commented on Apr 9, 2010
loewismannequin
Mannequin
More actions
If it did eat the patch, we would have lost it by now: there is nothing in the history that shows that a file was attached at some point. More likely, Skip forgot to attach it when submitting this report.
l0nwlf commented on Apr 9, 2010
l0nwlfmannequin
Mannequin
More actions
skip.montanaro forgot to attached the patch obviously, however the issue is trivial but there i.e. the presence of libpython.a file.
Martin> If it did eat the patch, we would have lost it by now: there is
Martin> nothing in the history that shows that a file was attached at
Martin> some point. More likely, Skip forgot to attach it when
Martin> submitting this report.
Yeah, I must have just forgotten to attach it. At one point I'm pretty sure
I had something in my sandbox, but have nothing now. Removing .a files is
pretty straightforward. Removing .so.X.Y files is a little more cumbersome
because globbing isn't perfect. This (only lightly tested) patch should be
good enough though:
Activity
smontanaro commentedon Oct 1, 2008
The "clean" target in the makefile fails to delete the libpython.a file
and the libpython.so.X.Y file (should you have configured using
--enable-shared). The attached trivial patch solves that problem.
The patch is against the trunk as of just before the 2.6 final release.
It will almost certainly apply cleanly to the py3k version as well.
devdanzin commentedon Apr 9, 2010
Skip, was there a patch here? I can't find it in the bug lists, so I think we both missed it?
Pinging Martin in case the tracker ate the patch :)
loewis commentedon Apr 9, 2010
If it did eat the patch, we would have lost it by now: there is nothing in the history that shows that a file was attached at some point. More likely, Skip forgot to attach it when submitting this report.
l0nwlf commentedon Apr 9, 2010
skip.montanaro forgot to attached the patch obviously, however the issue is trivial but there i.e. the presence of libpython.a file.
smontanaro commentedon Apr 9, 2010
Martin> If it did eat the patch, we would have lost it by now: there is
Martin> nothing in the history that shows that a file was attached at
Martin> some point. More likely, Skip forgot to attach it when
Martin> submitting this report.
Yeah, I must have just forgotten to attach it. At one point I'm pretty sure
I had something in my sandbox, but have nothing now. Removing .a files is
pretty straightforward. Removing .so.X.Y files is a little more cumbersome
because globbing isn't perfect. This (only lightly tested) patch should be
good enough though:
Index: Makefile.pre.in
===================================================================
--- Makefile.pre.in (revision 79207)
+++ Makefile.pre.in (working copy)
@@ -1156,8 +1156,9 @@
find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
even though the second addition would also match files like
Skip
merwok commentedon May 15, 2010
Note: Using find -delete avoids the extra process spawning for rm. However, if the -f option is really necessary, we’ll have to use rm.
Someone has an idea about the imperfect regex/glob pattern?
smontanaro commentedon May 16, 2010
The -delete expression isn't universally available. For example, it is not
present on Solaris. Better just to stick with the reliable rm.
Skip
vstinner commentedon May 21, 2010
Yes, "make clean" should remove *.a and *.so.* files. The patch looks ok.
birkenfeld commentedon Jul 31, 2010
Applied in r83372.