classification
Title: distutils dry-run breaks when attempting to bytecompile
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: anthonybaxter, eric.araujo, loewis, steve.dower, tarek
Priority: normal Keywords: patch

Created on 2005-01-26 07:19 by anthonybaxter, last changed 2021-02-03 18:29 by steve.dower. This issue is now closed.

Files
File name Uploaded Description Edit
dryrun.diff anthonybaxter, 2005-01-26 07:19
Messages (5)
msg47618 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2005-01-26 07:19
If you do a distutils --dry-run of an uninstalled
package, it will break when it attempts to check if the
non-installed  .py file needs bytecompiling. The
attached patch fixes this.
msg47619 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-01-29 14:35
Logged In: YES 
user_id=21627

The patch is incomplete - it does not update the docstring.

For symmetry with newer_group, it might be reasonable to
support the same three arguments.

Looking at the code, I find it unfortunate that it uses
os.path.exists, causing a stat call, and then does another
stat call to find the time stamp.

Perhaps it would be possible to implement newer in terms of
newer_group?

newer_pairwise should then probably also allow propagation
of the newer argument.
msg114945 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-25 23:00
I’ll port this patch to distutils2 as part of #8501 and ask Tarek whether it can go in distutils too.
msg145238 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-09 08:36
[Martin]
> Looking at the code, I find it unfortunate that it uses os.path.exists,
> causing a stat call, and then does another stat call to find the time stamp.

Are you noting the inefficiency of doing two stat calls instead of one, or saying that it should make none at all in dry-run mode?  My opinion is that a dry-run mode should not create any file nor make any changes, but reading files and calling processes that give info is fair game.
msg386418 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:29
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools
History
Date User Action Args
2021-02-03 18:29:16steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386418

resolution: out of date
stage: patch review -> resolved
2014-03-13 20:06:04eric.araujosetcomponents: + Distutils, - Distutils2
versions: + Python 2.7, Python 3.3, Python 3.4, - 3rd party
2011-10-09 08:36:58eric.araujosetmessages: + msg145238
2010-09-30 00:05:09eric.araujosetversions: + 3rd party, - Python 2.6, Python 2.5, Python 3.1, Python 2.7, Python 3.2
2010-08-25 23:00:25eric.araujosetversions: + Python 2.6, Python 2.5
nosy: + eric.araujo

messages: + msg114945

assignee: tarek -> eric.araujo
components: + Distutils2, - Distutils
2010-08-25 22:59:56eric.araujolinkissue8501 dependencies
2010-08-19 18:55:23BreamoreBoysetstage: patch review
type: behavior
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
2009-02-11 02:57:24ajaksu2setassignee: tarek
nosy: + tarek
2008-01-05 19:13:51christian.heimessetversions: + Python 2.6
2005-01-26 07:19:10anthonybaxtercreate