Permalink
Browse files

Add new waf + resolve.json

  • Loading branch information...
petya2164 committed Mar 31, 2017
1 parent 04cb4f0 commit 5c51f8413c851d8c72aaa12b63a4774b2025f6e9
Showing with 42 additions and 71 deletions.
  1. +8 −3 .gitignore
  2. +4 −4 buildbot.py
  3. +3 −20 config.py
  4. +17 −0 resolve.json
  5. +10 −10 waf
  6. +0 −34 wscript
View
@@ -17,12 +17,15 @@
# Compiled Doxygen documentation
/doxygen/html
# For projects that use Waf for building: http://code.google.com/p/waf/
# Waf files
waf-*
waf3-*
.waf-*
.waf3-*
.lock-*
build
bundle_dependencies
resolve_symlinks
resolved_dependencies
# Gnu Global tag files
GPATH
@@ -37,10 +40,11 @@ GTAGS
#Eclipse ignore
.cproject
.project
*.project
.metadata
local.properties
.classpath
.settings/
# Visual Studio ignore
*.bat
@@ -51,4 +55,5 @@ local.properties
*.sdf
*.opensdf
*.log
*.vcxproj*
VSProjects
View
@@ -33,13 +33,13 @@ def configure(properties):
if properties.get('build_distclean'):
command += ['distclean']
command += ['configure', '--git-protocol=git@']
command += ['configure', '--git_protocol=git@']
if 'waf_bundle_path' in properties:
command += ['--bundle-path=' + properties['waf_bundle_path']]
if 'waf_resolve_path' in properties:
command += ['--resolve_path=' + properties['waf_resolve_path']]
if 'dependency_project' in properties:
command += ['--{0}-use-checkout={1}'.format(
command += ['--{0}_checkout={1}'.format(
properties['dependency_project'],
properties['dependency_checkout'])]
View
@@ -16,28 +16,11 @@
'gtest',
]
# Importing a dynamically generated module
# Python recipe from http://code.activestate.com/recipes/82234
def importCode(code, name, add_to_sys_modules=0):
"""
Import dynamically generated code as a module. code is the
object containing the code (a string, a file handle or an
actual compiled code object, same types as accepted by an
exec statement). The name is the name to give to the module,
and the final argument says wheter to add it to sys.modules
or not. If it is added, a subsequent import statement using
name will return this module. If it is not added to sys.modules
import will try to load it in the normal fashion.
import foo
is equivalent to
foofile = open("/path/to/foo.py")
foo = importCode(foofile,"foo",1)
Returns a newly generated module.
Import dynamically generated code as a module.
Python recipe from http://code.activestate.com/recipes/82234
"""
import imp
@@ -71,7 +54,7 @@ def importCode(code, name, add_to_sys_modules=0):
# Import the code string as a module
mod = importCode(code, "config_helper")
# Run the actual config tool from the dynamic module
mod.config_tool(project_dependencies)
mod.config_tool(project_dependencies, project_name)
except:
print("Unexpected error:")
print(traceback.format_exc())
View
@@ -0,0 +1,17 @@
[
{
"name": "waf-tools",
"resolver": "git",
"method": "semver",
"major": 4,
"sources": ["github.com/steinwurf/waf-tools.git"]
},
{
"name": "gtest",
"internal": true,
"resolver": "git",
"method": "semver",
"major": 4,
"sources": ["github.com/steinwurf/gtest.git"]
}
]
View
20 waf

Large diffs are not rendered by default.

Oops, something went wrong.
View
34 wscript
@@ -4,43 +4,9 @@
APPNAME = 'bourne'
VERSION = '4.1.0'
import waflib.extras.wurf_options
def options(opt):
opt.load('wurf_common_tools')
def resolve(ctx):
import waflib.extras.wurf_dependency_resolve as resolve
ctx.load('wurf_common_tools')
ctx.add_dependency(resolve.ResolveVersion(
name='waf-tools',
git_repository='github.com/steinwurf/waf-tools.git',
major=3))
# Internal dependencies
if ctx.is_toplevel():
ctx.add_dependency(resolve.ResolveVersion(
name='gtest',
git_repository='github.com/steinwurf/gtest.git',
major=3))
def configure(conf):
conf.load("wurf_common_tools")
def build(bld):
bld.load("wurf_common_tools")
bld.env.append_unique(
'DEFINES_STEINWURF_VERSION',
'STEINWURF_BOURNE_VERSION="{}"'.format(

0 comments on commit 5c51f84

Please sign in to comment.