From 62627f8bfe006c4252941586bfdd13681a8cc3c0 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Tue, 13 Jun 2017 15:09:00 -0500 Subject: [PATCH] bury plang stuff into filters.python --- .gitignore | 5 +++-- CMakeLists.txt | 4 ---- plugins/python/filters/CMakeLists.txt | 5 +++++ plugins/python/filters/PythonFilter.hpp | 2 +- {pdal => plugins/python}/plang/Array.cpp | 4 ++-- {pdal => plugins/python}/plang/Array.hpp | 0 {pdal => plugins/python}/plang/CMakeLists.txt | 0 {pdal => plugins/python}/plang/Environment.cpp | 4 ++-- {pdal => plugins/python}/plang/Environment.hpp | 0 {pdal => plugins/python}/plang/Invocation.cpp | 4 ++-- {pdal => plugins/python}/plang/Invocation.hpp | 0 {pdal => plugins/python}/plang/Redirector.cpp | 2 +- {pdal => plugins/python}/plang/Redirector.hpp | 0 {pdal => plugins/python}/plang/Script.cpp | 2 +- {pdal => plugins/python}/plang/Script.hpp | 0 plugins/python/test/PythonFilterTest.cpp | 6 +++--- 16 files changed, 20 insertions(+), 18 deletions(-) rename {pdal => plugins/python}/plang/Array.cpp (98%) rename {pdal => plugins/python}/plang/Array.hpp (100%) rename {pdal => plugins/python}/plang/CMakeLists.txt (100%) rename {pdal => plugins/python}/plang/Environment.cpp (99%) rename {pdal => plugins/python}/plang/Environment.hpp (100%) rename {pdal => plugins/python}/plang/Invocation.cpp (99%) rename {pdal => plugins/python}/plang/Invocation.hpp (100%) rename {pdal => plugins/python}/plang/Redirector.cpp (99%) rename {pdal => plugins/python}/plang/Redirector.hpp (100%) rename {pdal => plugins/python}/plang/Script.cpp (98%) rename {pdal => plugins/python}/plang/Script.hpp (100%) diff --git a/.gitignore b/.gitignore index 2b1cc7ce60..37e62354d6 100644 --- a/.gitignore +++ b/.gitignore @@ -144,8 +144,9 @@ test/data/sbet/pipeline.xml python/*.egg* python/build/* -python/pdal/libpdalpython.so -python/pdal/libpdalpython.cpp +python/dist/* +python/pdal/libpdalpython* +python/pdal/libpdalpython* test/data/*.json test/data/pipeline/*.json test/data/filters/*.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 409ddc6754..a9d8527ce0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,10 +179,6 @@ if (NOT PDAL_HAVE_JSONCPP) endif() add_subdirectory(pdal/util) add_subdirectory(tools) -if (BUILD_PLUGIN_PYTHON) - set(PYTHON_VERSION_STRING "something" CACHE STRING "Python version" FORCE) - add_subdirectory(pdal/plang) -endif() if (BUILD_PLUGIN_MATLAB) add_subdirectory(pdal/mlang) endif() diff --git a/plugins/python/filters/CMakeLists.txt b/plugins/python/filters/CMakeLists.txt index 7fb9fa7aed..556c7be1c1 100644 --- a/plugins/python/filters/CMakeLists.txt +++ b/plugins/python/filters/CMakeLists.txt @@ -1,5 +1,10 @@ PDAL_ADD_PLUGIN(python_libname filter python FILES + ../plang/Array.cpp + ../plang/Invocation.cpp + ../plang/Environment.cpp + ../plang/Redirector.cpp + ../plang/Script.cpp PythonFilter.cpp LINK_WITH ${PDAL_PLANG_LIB_NAME}) target_include_directories(${python_libname} PRIVATE diff --git a/plugins/python/filters/PythonFilter.hpp b/plugins/python/filters/PythonFilter.hpp index baae2c9e5b..ab9f2b1f11 100644 --- a/plugins/python/filters/PythonFilter.hpp +++ b/plugins/python/filters/PythonFilter.hpp @@ -37,7 +37,7 @@ #include #include -#include +#include "../plang/Invocation.hpp" #include diff --git a/pdal/plang/Array.cpp b/plugins/python/plang/Array.cpp similarity index 98% rename from pdal/plang/Array.cpp rename to plugins/python/plang/Array.cpp index 35b2c033b9..0b48f5f23b 100644 --- a/pdal/plang/Array.cpp +++ b/plugins/python/plang/Array.cpp @@ -33,8 +33,8 @@ * OF SUCH DAMAGE. ****************************************************************************/ -#include -#include +#include "Array.hpp" +#include "Environment.hpp" #include diff --git a/pdal/plang/Array.hpp b/plugins/python/plang/Array.hpp similarity index 100% rename from pdal/plang/Array.hpp rename to plugins/python/plang/Array.hpp diff --git a/pdal/plang/CMakeLists.txt b/plugins/python/plang/CMakeLists.txt similarity index 100% rename from pdal/plang/CMakeLists.txt rename to plugins/python/plang/CMakeLists.txt diff --git a/pdal/plang/Environment.cpp b/plugins/python/plang/Environment.cpp similarity index 99% rename from pdal/plang/Environment.cpp rename to plugins/python/plang/Environment.cpp index aeae94d8c7..341b21c701 100644 --- a/pdal/plang/Environment.cpp +++ b/plugins/python/plang/Environment.cpp @@ -36,8 +36,8 @@ #include #endif -#include -#include +#include "Environment.hpp" +#include "Redirector.hpp" #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #define PY_ARRAY_UNIQUE_SYMBOL PDAL_ARRAY_API #include diff --git a/pdal/plang/Environment.hpp b/plugins/python/plang/Environment.hpp similarity index 100% rename from pdal/plang/Environment.hpp rename to plugins/python/plang/Environment.hpp diff --git a/pdal/plang/Invocation.cpp b/plugins/python/plang/Invocation.cpp similarity index 99% rename from pdal/plang/Invocation.cpp rename to plugins/python/plang/Invocation.cpp index c5fc338de3..d096110c8a 100644 --- a/pdal/plang/Invocation.cpp +++ b/plugins/python/plang/Invocation.cpp @@ -32,8 +32,8 @@ * OF SUCH DAMAGE. ****************************************************************************/ -#include -#include +#include "Invocation.hpp" +#include "Environment.hpp" #ifdef PDAL_COMPILER_MSVC # pragma warning(disable: 4127) // conditional expression is constant diff --git a/pdal/plang/Invocation.hpp b/plugins/python/plang/Invocation.hpp similarity index 100% rename from pdal/plang/Invocation.hpp rename to plugins/python/plang/Invocation.hpp diff --git a/pdal/plang/Redirector.cpp b/plugins/python/plang/Redirector.cpp similarity index 99% rename from pdal/plang/Redirector.cpp rename to plugins/python/plang/Redirector.cpp index f0014e7ba8..778103c87e 100644 --- a/pdal/plang/Redirector.cpp +++ b/plugins/python/plang/Redirector.cpp @@ -6,7 +6,7 @@ // // Blog article: http://mateusz.loskot.net/?p=2819 -#include +#include "Redirector.hpp" #ifdef PDAL_COMPILER_MSVC # pragma warning(disable: 4127) // conditional expression is constant diff --git a/pdal/plang/Redirector.hpp b/plugins/python/plang/Redirector.hpp similarity index 100% rename from pdal/plang/Redirector.hpp rename to plugins/python/plang/Redirector.hpp diff --git a/pdal/plang/Script.cpp b/plugins/python/plang/Script.cpp similarity index 98% rename from pdal/plang/Script.cpp rename to plugins/python/plang/Script.cpp index b2b21c6d25..9f33640408 100644 --- a/pdal/plang/Script.cpp +++ b/plugins/python/plang/Script.cpp @@ -32,7 +32,7 @@ * OF SUCH DAMAGE. ****************************************************************************/ -#include +#include "../plang/Script.hpp" #ifdef PDAL_COMPILER_MSVC # pragma warning(disable: 4127) // conditional expression is constant diff --git a/pdal/plang/Script.hpp b/plugins/python/plang/Script.hpp similarity index 100% rename from pdal/plang/Script.hpp rename to plugins/python/plang/Script.hpp diff --git a/plugins/python/test/PythonFilterTest.cpp b/plugins/python/test/PythonFilterTest.cpp index 94438eb3dd..f09aabe513 100644 --- a/plugins/python/test/PythonFilterTest.cpp +++ b/plugins/python/test/PythonFilterTest.cpp @@ -39,8 +39,9 @@ #include #include -#include -#include +#include "../plang/Invocation.hpp" +#include "../plang/Array.hpp" +#include "../plang/Environment.hpp" #include @@ -49,7 +50,6 @@ using namespace pdal; using namespace pdal::plang; -#include class PythonFilterTest : public ::testing::Test {