From 8168c77fde534dc39f01484d2ff2621d4ea89dc8 Mon Sep 17 00:00:00 2001 From: njlr Date: Tue, 7 Mar 2017 13:52:35 +0000 Subject: [PATCH 1/2] * Began working on Buck builds --- .buckconfig | 0 .gitignore | 8 +++++++- BUCK | 47 +++++++++++++++++++++++++++++++++++++++++++++++ buckaroo.json | 4 ++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .buckconfig create mode 100644 BUCK create mode 100644 buckaroo.json diff --git a/.buckconfig b/.buckconfig new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.gitignore b/.gitignore index 06ea5d43c8..01f8373c05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,10 @@ bin.SCons *.pyc *~ -\#*\# \ No newline at end of file +\#*\# + +/buck-out/ +/.buckd/ +/buckaroo/ +.buckconfig.local +BUCKAROO_DEPS diff --git a/BUCK b/BUCK new file mode 100644 index 0000000000..7559388980 --- /dev/null +++ b/BUCK @@ -0,0 +1,47 @@ +include_defs('//BUCKAROO_DEPS') + +# DL_IMPORT? +genrule( + name = 'pyconfig.h', + out = 'pyconfig.h', + cmd = 'touch $OUT', +) + +# TODO: Inject Python version +genrule( + name = 'patchlevel.h', + out = 'patchlevel.h', + cmd = 'echo "#define PY_MAJOR_VERSION 2 \n#define PY_MINOR_VERSION 7 \n#define PY_MICRO_VERSION 13" > $OUT', +) + +cxx_library( + name = 'boost-python', + header_namespace = '', + exported_headers = subdir_glob([ + ('include', 'boost/**/*.hpp'), + ]), + headers = { + 'pyconfig.h': ':pyconfig.h', + 'patchlevel.h': ':patchlevel.h', + }, + srcs = glob([ + 'src/**/*.cpp', + ]), + visibility = [ + 'PUBLIC', + ], + deps = BUCKAROO_DEPS, +) + +prebuilt_cxx_library( + name = 'boost-python-headers', + header_only = True, + header_namespace = 'boost', + exported_headers = subdir_glob([ + ('include/boost', '**/*.hpp'), + ]), + visibility = [ + 'PUBLIC', + ], + deps = BUCKAROO_DEPS, +) diff --git a/buckaroo.json b/buckaroo.json new file mode 100644 index 0000000000..bc1c73c2f5 --- /dev/null +++ b/buckaroo.json @@ -0,0 +1,4 @@ +{ + "name": "boost-python", + "dependencies": {} +} From 5582ec3ecb5f1c11eacbfff462ea451c6039a56e Mon Sep 17 00:00:00 2001 From: Nick La Rooy Date: Tue, 28 Mar 2017 11:18:46 +0100 Subject: [PATCH 2/2] Update BUCK --- BUCK | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUCK b/BUCK index 7559388980..a5563f466f 100644 --- a/BUCK +++ b/BUCK @@ -34,7 +34,7 @@ cxx_library( ) prebuilt_cxx_library( - name = 'boost-python-headers', + name = 'python-headers', header_only = True, header_namespace = 'boost', exported_headers = subdir_glob([