Skip to content

Commit

Permalink
Merge pull request #45 from pfernique/mako_coverage
Browse files Browse the repository at this point in the history
Move scons to _scons
  • Loading branch information
pfernique committed Aug 22, 2016
2 parents 3b90094 + 6a94a49 commit b0fb545
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion doc/basic/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Alias("cpp", lib)
Alias("build", lib)

wigenv = env.Clone()
from autowig.scons import boost_python_builder
from autowig._scons import boost_python_builder
boost_python_builder(wigenv)
Alias('wig', wigenv.BoostPython(['_module.py', '_module.cpp'], headers))

Expand Down
33 changes: 19 additions & 14 deletions doc/subset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"source": [
"import sys\n",
"from path import path\n",
"prefix = path(subprocess.check_output([\"llvm-config\", \"--prefix\"]).strip())\n",
"if not prefix == sys.prefix:\n",
"prefix = path(sys.prefix)\n",
"if not prefix == subprocess.check_output([\"llvm-config\", \"--prefix\"]).strip():\n",
" raise Exception"
]
},
Expand All @@ -72,7 +72,6 @@
},
"outputs": [],
"source": [
"from path import path\n",
"srcdir = path('PyClangLite')\n",
"if not srcdir.exists():\n",
" from git import Repo\n",
Expand Down Expand Up @@ -135,7 +134,7 @@
},
"outputs": [],
"source": [
"from autowig import autowig\n",
"import autowig\n",
"asg = autowig.AbstractSemanticGraph()"
]
},
Expand Down Expand Up @@ -178,8 +177,8 @@
"text": [
"6ba7b814-9dad-11d1-80b4-00c04fd430c8\n",
"class ::clang::ASTUnit * build_ast_from_code_with_args(class ::boost::python::api::object , class ::boost::python::api::object )\n",
"::clanglite::build_ast_from_code_with_args::9d35fb87-ecea-4e8a-a26b-849dd491154f\n",
"4d21bb644885554ba56b0a7d5951b4ab\n"
"::clanglite::build_ast_from_code_with_args::d4bbc81f-bd2d-4793-94a7-86b24029e21b\n",
"4cebf3555d235cd2a00daab8d7563b14\n"
]
}
],
Expand All @@ -205,8 +204,8 @@
"text": [
"6ba7b814-9dad-11d1-80b4-00c04fd430c8\n",
"class ::clang::ASTUnit * build_ast_from_code_with_args(class ::boost::python::api::object , class ::boost::python::api::object )\n",
"::clanglite::build_ast_from_code_with_args::9d35fb87-ecea-4e8a-a26b-849dd491154f\n",
"4d21bb644885554ba56b0a7d5951b4ab\n"
"::clanglite::build_ast_from_code_with_args::d4bbc81f-bd2d-4793-94a7-86b24029e21b\n",
"4cebf3555d235cd2a00daab8d7563b14\n"
]
}
],
Expand Down Expand Up @@ -253,17 +252,20 @@
" if node.parent.boost_python_export:\n",
" node.boost_python_export = False\n",
" \n",
" for node in asg.functions(free = True):\n",
" node.boost_python_export = False\n",
" for node in asg.variables(free = True):\n",
" node.boost_python_export = False\n",
" \n",
" from autowig.default_controller import refactoring\n",
" asg = refactoring(asg)\n",
" for fct in asg['::clanglite'].functions():\n",
" if not fct.localname == 'build_ast_from_code_with_args':\n",
" fct.parent = fct.parameters[0].qualified_type.desugared_type.unqualified_type\n",
" \n",
" \n",
" for node in asg.functions(free = True):\n",
" node.boost_python_export = False\n",
" for node in asg.variables(free = True):\n",
" node.boost_python_export = False\n",
"\n",
" for node in asg['::boost::python'].classes(nested = True):\n",
" node.boosT_python_export = True\n",
" \n",
" subset = []\n",
" classes = [asg['class ::clang::Type'], asg['class ::clang::Decl']]\n",
" subset += classes\n",
Expand All @@ -276,6 +278,9 @@
" subset.append(asg['class ::clang::SourceLocation'])\n",
" subset.append(asg['class ::clang::CXXBaseSpecifier'])\n",
" subset.append(asg['class ::clang::DeclContext'])\n",
" subset.append(asg['class ::clang::TemplateArgument'])\n",
" asg['class ::clang::TemplateArgument'].is_copyable = True\n",
" subset.append(asg['class ::clang::TemplateArgumentList'])\n",
" subset.append(asg['enum ::clang::AccessSpecifier'])\n",
" subset.append(asg['enum ::clang::LinkageSpecDecl::LanguageIDs'])\n",
" subset.append(asg['enum ::clang::BuiltinType::Kind'])\n",
Expand Down
2 changes: 1 addition & 1 deletion src/py/autowig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
boost_python_export.proxy = 'mapping'
boost_python_module.proxy = 'default'
boost_python_decorator.proxy = 'default'
from .scons import scons
from ._scons import scons
File renamed without changes.
2 changes: 1 addition & 1 deletion src/py/autowig/gcc_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import parse
from path import path

from .scons import ShellSession
from ._scons import ShellSession

def gcc_5_feedback(err, directory, asg, **kwargs):
if isinstance(err, ShellSession):
Expand Down

0 comments on commit b0fb545

Please sign in to comment.