File: configfile.py

package info (click to toggle)
libxmlbird 1.2.15-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 308 kB
  • sloc: python: 649; xml: 122; sh: 51; makefile: 14
file content (20 lines) | stat: -rwxr-xr-x 733 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3

def write_compile_parameters (prefix, libdir, dest, cc, valac, non_null,
                              valacflags, cflags, ldflags):
    f = open('./scripts/config.py', 'w+')
    f.write("#!/usr/bin/python3\n")
    f.write("PREFIX =  \"" + prefix + "\"\n")
    f.write("LIBDIR =  \"" + libdir + "\"\n")
    f.write("DEST = \"" + dest + "\"\n")
    f.write("CC = \"" + cc + "\"\n")
    f.write("VALAC = \"" + valac + "\"\n")

    if non_null:
        f.write("NON_NULL = \"--enable-experimental-non-null\"\n")
    else:
        f.write("NON_NULL = \"\"\n")
        
    f.write("VALACFLAGS = " + str(valacflags) + "\n")
    f.write("CFLAGS = " + str(cflags) + "\n")
    f.write("LDFLAGS = " + str(ldflags) + "\n")