[issue35893] distutils fails to build extension on windows when it is a package.__init__
Ronald Oussoren
report at bugs.python.org
Mon Feb 4 16:41:07 EST 2019
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
@Paul, modulegraph2 uses flit, but I do use setuptools to build extensions in the test suite. The problematic setup.py file is in testsuite/nodebuilder-tree.
I do have a workaround in that setup.py:
# START
def get_export_symbols(self, ext):
parts = ext.name.split(".")
if parts[-1] == "__init__":
initfunc_name = "PyInit_" + parts[-2]
else:
initfunc_name = "PyInit_" + parts[-1]
build_ext.build_ext.get_export_symbols = get_export_symbols
# END
Creating a PR from this would be easy, but IMHO there should be a new test case as well.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35893>
_______________________________________
More information about the Python-bugs-list
mailing list