[issue13326] make clean failed on OpenBSD

2011-11-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41ab1dfaf1d4 by Petri Lehtinen in branch '3.2': Remove __pycache__ directories correctly on OpenBSD http://hg.python.org/cpython/rev/41ab1dfaf1d4 New changeset f853a2cbd68b by Petri Lehtinen in branch 'default': Remove __pycache__ directories corre

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: The issue exists only in 3.2 and 3.3, as 2.7 doesn't have __pycache__ (PEP 3147). In 3.2 and 3.3, all *.py[co] files are in __pycache__ directories, so the pycremoval make target can only remove the __pycache__ directories, using the -depth option of find to

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > No, the -depth argument avoids that. Ah, you are right, my bad. -- ___ Python tracker ___ ___ Py

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: > Then you'd probably reintroduce issue8665. No, the -depth argument avoids that. -- ___ Python tracker ___ __

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'd still do it like this for portability's sake: > > + -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' Then you'd probably reintroduce issue8665. -- ___ Python tracker

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: > + -find $(srcdir) -name '__pycache__' -print0 | xargs -0r rm -rf I'd still do it like this for portability's sake: + -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' -- ___ Python tracker

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: By the way, removing *.pyc and *.pyo is useless: Python 3.3 only generates such files in __pycache__: + -find $(srcdir) -name '*.py[co]' -print0 | xargs -0r rm -f + -find $(srcdir) -name '__pycache__' -print0 | xargs -0r rmdir can be simplified to

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Remi Pointel
Remi Pointel added the comment: > How about using the -depth option then? It's in POSIX but does OpenBSD have > it? The man page of GNU find says it has a -d option (that does the same as > -depth) for compatibility with BSD. Yes, we have this option: -depth This primary always evaluates to

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: Ah, I didn't think about that. How about using the -depth option then? It's in POSIX but does OpenBSD have it? The man page of GNU find says it has a -d option (that does the same as -depth) for compatibility with BSD. -- ___

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Remi Pointel
Remi Pointel added the comment: Please see this: http://bugs.python.org/issue8665 http://hg.python.org/cpython/rev/5468f3aee4ae/ -- ___ Python tracker ___ _

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: I mean that this should be enough to close this issue: - -find $(srcdir) -name '__pycache__' -exec rmdir {} '+' + -find $(srcdir) -name '__pycache__' -exec rmdir {} ';' That is, use ';' instead of the unportable '+' instead of changing all cleaning

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Remi Pointel
Remi Pointel added the comment: > According to the man page, find -print0 and xargs -r are also GNU extensions. > Even though they work on OpenBSD (do they?), they could still break on some > platforms. Yes, it works fine, but you're allright. > As find -exec cmd {} ';' is already used for e

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: According to the man page, find -print0 and xargs -r are also GNU extensions. Even though they work on OpenBSD (do they?), they could still break on some platforms. As find -exec cmd {} ';' is already used for everything but __pycache__, I'd rather only chan

[issue13326] make clean failed on OpenBSD

2011-11-02 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13326] make clean failed on OpenBSD

2011-11-02 Thread Remi Pointel
Remi Pointel added the comment: FYI I tested with Python 3.3, but I didn't look for 2.7 and 3.2, I think modifications are also needed. -- ___ Python tracker ___ __

[issue13326] make clean failed on OpenBSD

2011-11-02 Thread Remi Pointel
New submission from Remi Pointel : Hi, "make clean" failed on OpenBSD with this error: find: -exec: no terminating ";" *** Error code 1 (ignored) It seems that "-exec" with "+" is a GNU extension. Are you OK with this diff which does the same and is multi-platform? Modifications can only be d