mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-21 17:35:55 +01:00
no more file() in python 3.3
This commit is contained in:
parent
90157ca97d
commit
b022f8a314
@ -1,3 +1,12 @@
|
||||
NEW IN WAF 1.7.6
|
||||
----------------
|
||||
* Better encapsulation of conf.check_cfg(uselib_store=...) defines #1212
|
||||
* Support for python modules in fortran
|
||||
* Extension files of D binaries on Mac
|
||||
* Raise an error when a tex manually-provided dependency is not found #1209
|
||||
* Enforce a stable name in bld(rule=..., name=undefined) to prevent rebuilds
|
||||
* Enhanced support for flex on win32 and msys #1207 #1211
|
||||
|
||||
NEW IN WAF 1.7.5
|
||||
----------------
|
||||
* Fixed the kde4 library detection on Fedora
|
||||
|
@ -33,7 +33,7 @@ def lib_name(i):
|
||||
|
||||
def createHeader(name):
|
||||
filename = name + ".h"
|
||||
handle = file(filename, "w" )
|
||||
handle = open(filename, "w" )
|
||||
|
||||
guard = name + '_h_'
|
||||
handle.write ('#ifndef ' + guard + '\n');
|
||||
@ -50,7 +50,7 @@ def createHeader(name):
|
||||
|
||||
def createCPP(name, lib_number, classes_per_lib, internal_includes, external_includes):
|
||||
filename = name + ".cpp"
|
||||
handle = file(filename, "w" )
|
||||
handle = open(filename, "w" )
|
||||
|
||||
header= name + ".h"
|
||||
handle.write ('#include "' + header + '"\n');
|
||||
@ -72,7 +72,7 @@ def createCPP(name, lib_number, classes_per_lib, internal_includes, external_inc
|
||||
|
||||
|
||||
def createSConscript(lib_number, classes):
|
||||
handle = file("SConscript", "w");
|
||||
handle = open("SConscript", "w");
|
||||
handle.write("Import('env')\n")
|
||||
handle.write('list = Split("""\n');
|
||||
for i in range(classes):
|
||||
@ -81,11 +81,11 @@ def createSConscript(lib_number, classes):
|
||||
handle.write('env.StaticLibrary("lib_' + str(lib_number) + '", list)\n\n')
|
||||
|
||||
def createLibCMakeLists(lib_number, classes):
|
||||
handle = file("CMakeLists.txt", "w")
|
||||
handle = open("CMakeLists.txt", "w")
|
||||
handle.write("""add_library(lib_%s STATIC %s)\n""" % (str(lib_number), ' '.join(('class_%s' % str(i) for i in range(classes)))))
|
||||
|
||||
def createLibMakefile(lib_number, classes):
|
||||
handle = file("Makefile", "w");
|
||||
handle = open("Makefile", "w");
|
||||
handle.write ("""COMPILER = g++
|
||||
INC = -I..
|
||||
CCFLAGS = -g -Wall $(INC)
|
||||
@ -120,7 +120,7 @@ depend:
|
||||
""")
|
||||
|
||||
def createLibJamFile(lib_number, classes):
|
||||
handle = file("Jamfile", "w")
|
||||
handle = open("Jamfile", "w")
|
||||
handle.write ("SubDir TOP lib_" + str(lib_number) + " ;\n\n")
|
||||
handle.write ("SubDirHdrs $(INCLUDES) ;\n\n")
|
||||
handle.write ("Library lib_" + str(lib_number) + " :\n")
|
||||
@ -129,7 +129,7 @@ def createLibJamFile(lib_number, classes):
|
||||
handle.write (' ;\n')
|
||||
|
||||
def createVCProjFile(lib_number, classes):
|
||||
handle = file("lib_" + str(lib_number) + ".vcproj", "w")
|
||||
handle = open("lib_" + str(lib_number) + ".vcproj", "w")
|
||||
handle.write("""<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
@ -197,7 +197,7 @@ def createLibrary(lib_number, classes, internal_includes, external_includes):
|
||||
os.chdir("..")
|
||||
|
||||
def createCMakeLists(libs):
|
||||
handle = file("CMakeLists.txt", "w")
|
||||
handle = open("CMakeLists.txt", "w")
|
||||
handle.write("""project('profiling-test')
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
@ -208,7 +208,7 @@ include_directories(${CMAKE_SOURCE_DIR})
|
||||
handle.write("""add_subdirectory(lib_%s)\n""" % str(i))
|
||||
|
||||
def createSConstruct(libs):
|
||||
handle = file("SConstruct", "w");
|
||||
handle = open("SConstruct", "w");
|
||||
handle.write("""env = Environment(CPPFLAGS=['-Wall'], CPPDEFINES=['LINUX'], CPPPATH=[Dir('#')])\n""")
|
||||
handle.write("""env.Decider('timestamp-newer')\n""")
|
||||
handle.write("""env.SetOption('implicit_cache', True)\n""")
|
||||
@ -218,7 +218,7 @@ def createSConstruct(libs):
|
||||
handle.write("""env.SConscript("lib_%s/SConscript", exports=['env'])\n""" % str(i))
|
||||
|
||||
def createFullMakefile(libs):
|
||||
handle = file("Makefile", "w")
|
||||
handle = open("Makefile", "w")
|
||||
|
||||
handle.write('subdirs = \\\n')
|
||||
for i in range(libs):
|
||||
@ -239,13 +239,13 @@ depend:
|
||||
""")
|
||||
|
||||
def createFullJamfile(libs):
|
||||
handle = file("Jamfile", "w")
|
||||
handle = open("Jamfile", "w")
|
||||
handle.write ("SubDir TOP ;\n\n")
|
||||
|
||||
for i in range(libs):
|
||||
handle.write('SubInclude TOP ' + lib_name(i) + ' ;\n')
|
||||
|
||||
handle = file("Jamrules", "w")
|
||||
handle = open("Jamrules", "w")
|
||||
handle.write('INCLUDES = $(TOP) ;\n')
|
||||
|
||||
WT = """#! /usr/bin/env python
|
||||
@ -275,7 +275,7 @@ def createWtop(libs, classes):
|
||||
f.close()
|
||||
|
||||
def createFullSolution(libs):
|
||||
handle = file("solution.sln", "w")
|
||||
handle = open("solution.sln", "w")
|
||||
handle.write("Microsoft Visual Studio Solution File, Format Version 8.00\n")
|
||||
|
||||
for i in range(libs):
|
||||
@ -285,7 +285,7 @@ def createFullSolution(libs):
|
||||
handle.write('EndProject\n')
|
||||
|
||||
def createAutotoolsTop(libs):
|
||||
handle = file("configure.ac", "w")
|
||||
handle = open("configure.ac", "w")
|
||||
handle.write('''\
|
||||
AC_INIT([bench], [1.0.0])
|
||||
AC_CONFIG_AUX_DIR([autotools-aux])
|
||||
@ -296,7 +296,7 @@ AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
''')
|
||||
|
||||
handle = file("Makefile.am", "w")
|
||||
handle = open("Makefile.am", "w")
|
||||
handle.write('''\
|
||||
AM_CPPFLAGS = -I$(srcdir)
|
||||
lib_LTLIBRARIES =
|
||||
@ -305,7 +305,7 @@ lib_LTLIBRARIES =
|
||||
|
||||
def createAutotools(lib_number, classes):
|
||||
|
||||
handle = file("Makefile.am", "w")
|
||||
handle = open("Makefile.am", "w")
|
||||
handle.write('''\
|
||||
lib_LTLIBRARIES += lib%s.la
|
||||
lib%s_la_SOURCES =''' % (str(lib_number), str(lib_number)))
|
||||
|
@ -17,7 +17,7 @@ HEXVERSION=0x1070500
|
||||
WAFVERSION="1.7.5"
|
||||
"""Constant updated on new releases"""
|
||||
|
||||
WAFREVISION="a7e69d6b81b04729804754c4d5214da063779a65"
|
||||
WAFREVISION="90157ca97deb241023d15a16bab6f36e718191fd"
|
||||
"""Constant updated on new releases"""
|
||||
|
||||
ABI = 98
|
||||
|
5
wscript
5
wscript
@ -70,8 +70,7 @@ def init(ctx):
|
||||
pats.append(('^HEXVERSION(.*)', 'HEXVERSION=%s' % hexver))
|
||||
|
||||
try:
|
||||
#rev = k[0].cmd_and_log('git log | grep "^commit" | wc -l', quiet=0).strip()
|
||||
rev = k[0].cmd_and_log("git rev-parse HEAD").strip()
|
||||
rev = ctx.cmd_and_log("git rev-parse HEAD").strip()
|
||||
pats.append(('^WAFREVISION(.*)', 'WAFREVISION="%s"' % rev))
|
||||
except Exception:
|
||||
pass
|
||||
@ -129,7 +128,7 @@ def compute_revision():
|
||||
sources.sort()
|
||||
m = md5()
|
||||
for source in sources:
|
||||
f = file(source,'rb')
|
||||
f = open(source,'rb')
|
||||
readBytes = 100000
|
||||
while (readBytes):
|
||||
readString = f.read(readBytes)
|
||||
|
Loading…
Reference in New Issue
Block a user