[Patches] [ python-Patches-1168055 ] Add current dir when running try_run test program

SourceForge.net noreply at sourceforge.net
Mon Mar 12 19:26:50 CET 2007


Patches item #1168055, was opened at 2005-03-22 02:49
Message generated for change (Comment added) made by pje
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1168055&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils and setup.py
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Michiel de Hoon (mdehoon)
>Assigned to: Collin Winter (collinwinter)
Summary: Add current dir when running try_run test program

Initial Comment:
The try_run function in command/config.py is used to
run a test program as part of configuring an extension
module with "python setup.py config" before running
"python setup.py build". When running the test program,
the current directory is not included in the program
name. So it attempts to run _configtest instead of
./_configtest. This works fine as long as the user has
the current directory in the path. If not, the attempt
to run _configtest fails. The patch adds the current
directory in front of _configtest, so that the program
runs even if the user does not have the current
directory in the path.

----------------------------------------------------------------------

>Comment By: Phillip J. Eby (pje)
Date: 2007-03-12 18:26

Message:
Logged In: YES 
user_id=56214
Originator: NO

Sorry, I've never used the "config" command nor seen any code that does,
nor any documentation for it.  I didn't even know it was actually usable.

The OP's rationale for the change sounds reasonable to me, but a quick
skim of the module doesn't convince me that it'll fix the problem
correctly, vs. e.g. using os.path.abspath().  One thing that bugs me is why
the program's being created in the current directory instead of the build/
directory in the first place.  ISTM that there's a lot more that's broken
here.   OTOH, I don't suppose the patch would make things any worse.  It
would be nice if the original author of the module were around.


----------------------------------------------------------------------

Comment By: Collin Winter (collinwinter)
Date: 2007-03-12 17:00

Message:
Logged In: YES 
user_id=1344176
Originator: NO

Phillip, any thoughts?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1168055&group_id=5470


More information about the Patches mailing list