Author Nils Kattenbeck
Recipients Nils Kattenbeck, bethard, ncoghlan, paul.j3, peter.otten, samuelmarks, tebeka, zertrin
Date 2021-07-23.16:08:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I expanded the patch from tebeka to also work with invocations like `python3 -m` where `` is a file and not a directory with a ``. This was able to handle everything I threw at it.

However due to the import of zipfile which itself imports binascii the build of CPython itself fails at the `sharedmods` stage...

 CC='gcc -pthread' LDSHARED='gcc -pthread -shared    ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' 	_TCLTK_INCLUDES='' _TCLTK_LIBS='' 	./python -E ./  build
Traceback (most recent call last):
  File "/home/septatrix/Documents/programming/cpython/./", line 3, in <module>
    import argparse
  File "/home/septatrix/Documents/programming/cpython/Lib/", line 93, in <module>
    from zipfile import is_zipfile as _is_zipfile
  File "/home/septatrix/Documents/programming/cpython/Lib/", line 6, in <module>
    import binascii
ModuleNotFoundError: No module named 'binascii'
make: *** [Makefile:639: sharedmods] Error 1

I guess this is because binascii is a c module and not yet build at that point in time. Does anyone who knows more about the build system have an idea how to resolve this?


Resolving this bug would also allow the removal of several workarounds for this in the stdlib:

Date User Action Args
2021-07-23 16:08:12Nils Kattenbecksetrecipients: + Nils Kattenbeck, tebeka, ncoghlan, peter.otten, bethard, paul.j3, zertrin, samuelmarks
2021-07-23 16:08:12Nils Kattenbecksetmessageid: <>
2021-07-23 16:08:12Nils Kattenbecklinkissue22240 messages
2021-07-23 16:08:12Nils Kattenbeckcreate