[Python-bugs-list] [ python-Bugs-517451 ] Option processing in setup.cfg

noreply@sourceforge.net noreply@sourceforge.net
Tue, 26 Mar 2002 12:05:11 -0800


Bugs item #517451, was opened at 2002-02-14 06:33
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=517451&group_id=5470

Category: Distutils
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Konrad Hinsen (hinsen)
Assigned to: A.M. Kuchling (akuchling)
Summary: Option processing in setup.cfg

Initial Comment:
When building RPM files with distutils, I noticed that adding "use_rpm_opt_flags=0" to the file setup.cfg had no effect, although the equivalent command-line option --no-rpm-opt-flags works as advertised.

Some debugging showed the reason: in the first case, the variable self.use_rpm_opt_flags in commands/bdist_rpm.py has the value '0' (string), whereas in the second case it is 0 (integer). The test "if self.use_rpm_opt_flags" does not work as expected if the variable is a string, of course.

I suppose that individual commands should not have to worry about the data type of binary options, so I suspect this is a general bug in distutils option processing.


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

>Comment By: A.M. Kuchling (akuchling)
Date: 2002-03-26 15:05

Message:
Logged In: YES 
user_id=11375

Marking as fixed and closing this bug.


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

Comment By: A.M. Kuchling (akuchling)
Date: 2002-03-21 18:27

Message:
Logged In: YES 
user_id=11375

Actually the Distutils has machinery to handle this; 
however, no one told it that the use_rpm_opt_flags option 
is a Boolean.  Try the attached patch, and let me know if 
it fixes this.  (I'll check it into CVS anyway, since
it's obviously needed, whether or not it fixes your 
problem.)


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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=517451&group_id=5470