diff options
| author | Michael Forney <mforney@mforney.org> | 2017-12-30 22:43:47 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-12-30 22:43:47 -0800 |
| commit | f4c50108da9e4674516112ace7f0097d264fe7e4 (patch) | |
| tree | ec9475a56ea86d1638c45abb546122d8c0532fe4 /pkg/python/gen.lua | |
| parent | b5d6c2aaedeb6f1dd760da9461739328666e18b7 (diff) | |
Add raw mode for iterlines
Diffstat (limited to 'pkg/python/gen.lua')
| -rw-r--r-- | pkg/python/gen.lua | 7 |
1 files changed, 3 insertions, 4 deletions
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' |
