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.

Author alunduil
Recipients alunduil
Date 2014-02-24.00:27:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1393201670.58.0.749043113933.issue20754@psf.upfronthosting.co.za>
In-reply-to
Content
I first noticed this issue when configuring nose via setup.cfg and reported the behavior in this issue on their tracker: https://github.com/nose-devs/nose/issues/733

I'll repaste the important bits here:

When using a setup.cfg with the following contents (including minor variations):

[nosetests]
logging-format = %(lineno)d: %(process)d: %(message)s
With any setup.py file the following error is raised when trying to run setup.py (python2.7 used for example, error also occurs in 3.3):

alunduil@elijah margarine % python2.7 setup.py nosetests
Traceback (most recent call last):
  File "setup.py", line 108, in <module>
    setup(**PARAMS)
  File "/usr/lib64/python2.7/distutils/core.py", line 125, in setup
    dist.parse_config_files()
  File "/usr/lib64/python2.7/distutils/dist.py", line 397, in parse_config_files
    val = parser.get(section,opt)
  File "/usr/lib64/python2.7/ConfigParser.py", line 623, in get
    return self._interpolate(section, option, value, d)
  File "/usr/lib64/python2.7/ConfigParser.py", line 669, in _interpolate
    option, section, rawval, e.args[0])
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
        section: [nosetests]
        option : logging-format
        key    : pathname
        rawval : %(pathname)s:%(lineno)d: %(process)d: %(message)s

The suggested fix of using %% to pass the interpolation through to nose requires that distutils use SafeConfigParser rather than ConfigParser.

I've verified that this does indeed appear to work (at least fixing the distutils interaction).  The only place the change needs to be made is on lines 378 and 386 in distutils/dist.py.

I can attach a patch or send a pull request with this fix if there are no objections to this solution.
History
Date User Action Args
2014-02-24 00:27:50alunduilsetrecipients: + alunduil
2014-02-24 00:27:50alunduilsetmessageid: <1393201670.58.0.749043113933.issue20754@psf.upfronthosting.co.za>
2014-02-24 00:27:50alunduillinkissue20754 messages
2014-02-24 00:27:48alunduilcreate