From f4c50108da9e4674516112ace7f0097d264fe7e4 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 30 Dec 2017 22:43:47 -0800 Subject: Add raw mode for iterlines --- pkg/python/gen.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pkg/python') diff --git a/pkg/python/gen.lua b/pkg/python/gen.lua index 98517143..b9e01bec 100644 --- a/pkg/python/gen.lua +++ b/pkg/python/gen.lua @@ -9,8 +9,8 @@ cflags{ local sources = {} local modules = {} -for line in io.lines(pkg.dir..'/Setup') do - if #line > 0 and not line:find('^[*#]') then +for line in iterlines('Setup') do + if not line:hasprefix('*') then local i = line:find(' ', 1, true) modules[line:sub(1, i and i - 1)] = true while i do @@ -70,7 +70,7 @@ cc('Modules/getpath.c', nil, { local platform = 'linux' local abiflags = '' -for line in io.lines(pkg.dir..'/pyconfig.h') do +for line in iterlines('pyconfig.h', 1) do if line == '#define WITH_PYMALLOC 1' then abiflags = abiflags..'m' elseif line == '#define Py_DEBUG 1' then @@ -211,5 +211,4 @@ file('lib/python3.6/_sysconfigdata_'..abiflags..'_'..platform..'_.py', '644', '$ file('lib/python3.6/Makefile', '644', '$dir/lib/Makefile') dir('lib/python3.6/lib-dynload', '755') -table.insert(pkg.inputs.gen, {'$dir/Setup', '$dir/pyconfig.h'}) fetch 'curl' -- cgit v1.2.3