This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Option processing in setup.cfg
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, hinsen
Priority: normal Keywords:

Created on 2002-02-14 11:33 by hinsen, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bdist_rpm-patch akuchling, 2002-03-21 23:27 Patch for bdist_rpm.py to list all the Boolean options
Messages (3)
msg9272 - (view) Author: Konrad Hinsen (hinsen) Date: 2002-02-14 11:33
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.
msg9273 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-03-21 23:27
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.)
msg9274 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-03-26 20:05
Logged In: YES 
user_id=11375

Marking as fixed and closing this bug.
History
Date User Action Args
2022-04-10 16:04:59adminsetgithub: 36102
2002-02-14 11:33:11hinsencreate