REF: refactor common code between clib and pyext build.
REF: refactor common code between clib and pyext build.

cournape/Bento,cournape/Bento,cournape/Bento,cournape/Bento,abadger/Bento,abadger/Bento,abadger/Bento,abadger/Bento