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: h2py.py regular expression missing
Type: compile error Stage: resolved
Components: Cross-Build Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Thomas.Roos, loewis, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2015-01-27 11:13 by Thomas.Roos, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
IN.py.patch Thomas.Roos, 2015-01-27 11:13 patch to change regex in h2py.py
Messages (4)
msg234817 - (view) Author: Thomas Roos (Thomas.Roos) Date: 2015-01-27 11:13
Hi,
my issue was that SO_BINDTODEVICE symbol was not defined in /Lib/plat-linux2/IN.py which is generated by h2py.py.
This is because the regex is missing out include dirs with "-" in the name.
In my yocto cross build system this define is in asm-generic, don't know about other build systems. 
.../usr/include/asm-generic/socket.h:#define SO_BINDTODEVICE       25
so could you please change following regex in h2py.py (patch attached)
-p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
+p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.-]+)')
msg237031 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-03-02 08:41
my be change the pattern to '<([^>\n]+)>'?
msg237040 - (view) Author: Thomas Roos (Thomas.Roos) Date: 2015-03-02 10:51
works for me
msg242472 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-05-03 13:18
New changeset b32ca610c9e6 by Serhiy Storchaka in branch '2.7':
Issue #23330: h2py now supports arbitrary filenames in #include.
https://hg.python.org/cpython/rev/b32ca610c9e6

New changeset 0079465a9425 by Serhiy Storchaka in branch '3.4':
Issue #23330: h2py now supports arbitrary filenames in #include.
https://hg.python.org/cpython/rev/0079465a9425

New changeset f49e7e315d65 by Serhiy Storchaka in branch 'default':
Issue #23330: h2py now supports arbitrary filenames in #include.
https://hg.python.org/cpython/rev/f49e7e315d65
History
Date User Action Args
2022-04-11 14:58:12adminsetgithub: 67519
2015-05-03 14:27:21serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: resolved
2015-05-03 13:18:50python-devsetnosy: + python-dev
messages: + msg242472
2015-04-04 21:16:41serhiy.storchakasetassignee: serhiy.storchaka
2015-03-02 10:51:28Thomas.Roossetmessages: + msg237040
2015-03-02 08:41:12serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg237031
2015-03-02 08:20:34ezio.melottisetnosy: + loewis
2015-01-27 11:13:17Thomas.Rooscreate