* [gentoo-commits] gentoo-x86 commit in dev-lang/yasm/files: yasm-1.2.0-fix_cython_check.patch
@ 2012-04-03 23:33 Mike Gilbert (floppym)
0 siblings, 0 replies; only message in thread
From: Mike Gilbert (floppym) @ 2012-04-03 23:33 UTC (permalink / raw
To: gentoo-commits
floppym 12/04/03 23:33:16
Added: yasm-1.2.0-fix_cython_check.patch
Log:
Add patch to improve cython detection. Requested by Arfrever.
(Portage version: 2.2.0_alpha98/cvs/Linux x86_64)
Revision Changes Path
1.1 dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch?rev=1.1&content-type=text/plain
Index: yasm-1.2.0-fix_cython_check.patch
===================================================================
http://tortall.lighthouseapp.com/projects/78676-yasm/tickets/249
--- m4/cython.m4
+++ m4/cython.m4
@@ -2,13 +2,14 @@
dnl be set before this function is called.
dnl CYTHON_CHECK_VERSION([MIN-VERSION], [ACTION-IF-TRUE], [ACTION-IF-FALSE])
AC_DEFUN([CYTHON_CHECK_VERSION],
- [prog="import sys
+ [prog="import re, sys
from Cython.Compiler.Version import version
def get_int(arg):
- try:
- return int(arg)
- except ValueError:
+ matched = re.match(r'\d+', arg)
+ if matched is None:
return 0
+ else:
+ return int(matched.group(0))
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
ver = map(get_int, version.rstrip('abcdefghijklmnopqrstuvwxyz').split('.')) + [[0, 0, 0]]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-03 23:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03 23:33 [gentoo-commits] gentoo-x86 commit in dev-lang/yasm/files: yasm-1.2.0-fix_cython_check.patch Mike Gilbert (floppym)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox