homepage

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 martin.panter
Recipients Hernan.Grecco, beng94, martin.panter
Date 2016年02月21日.07:05:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456038344.51.0.319704905184.issue21042@psf.upfronthosting.co.za>
In-reply-to
Content
Tamás, it might be a good idea for you to sign a contributor agreement <https://www.python.org/psf/contrib/contrib-form/>.
I compiled Python in 32-bit mode and tried your v2 patch out, which found the wrong library as I predicted. Then I tried your new regex and it picked out the correct line. I had to edit it to get it to extract just the filename from the line:
r'lib%s\.[^\s]+\s\(%s(?:,\s.*)?\)\s=>\s(.*)' % (re.escape(name), abi_type)
I factored out the closing bracket from the comma + space bit, moved the group brackets to the end to extract the filename, and made it a raw string.
Without the patch, in 32-bit mode it will find 64-bit-only libraries:
>>> find_library("m") # 32- and 64-bit available
'libm.so.6'
>>> find_library("tcl8.6") # Only 64-bit version available!
'libtcl8.6.so'
With my edited regex:
>>> find_library("m")
'/usr/lib32/libm.so.6'
>>> find_library("tcl8.6") is None # No 32-bit version found
True
History
Date User Action Args
2016年02月21日 07:05:44martin.pantersetrecipients: + martin.panter, Hernan.Grecco, beng94
2016年02月21日 07:05:44martin.pantersetmessageid: <1456038344.51.0.319704905184.issue21042@psf.upfronthosting.co.za>
2016年02月21日 07:05:44martin.panterlinkissue21042 messages
2016年02月21日 07:05:43martin.pantercreate

AltStyle によって変換されたページ (->オリジナル) /