[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

Lumír Balhar report at bugs.python.org
Wed Jun 9 03:33:26 EDT 2021


Lumír Balhar <frenzy.madness at gmail.com> added the comment:

Thanks for the report.

The regression is caused by the fact that the old implementation of parse_makefile in distutils.sysconfig was using feature-rich class TextFile which handles all the functionalities you reported as broken - stripping of comments, joining lines, and more.

The new implementation of parse_makefile in sysconfig just reads all the lines without any processing.

The TextFile class is deprecated together with the whole distutils. The class is not used outside of distutils modules, only in these functions:

distutils.extension:read_setup_file
distutils.sdist:read_template
+ its tests in distutils/tests/test_text_file.py

If the functionality is something we want to preserve, we should find a new home for the class and then we can use it in the sysconfig module.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44351>
_______________________________________


More information about the Python-bugs-list mailing list