diff -Nru python-pcl-0.3.0~rc1+dfsg/debian/changelog python-pcl-0.3.0~rc1+dfsg/debian/changelog --- python-pcl-0.3.0~rc1+dfsg/debian/changelog 2018-10-14 17:04:37.000000000 +0000 +++ python-pcl-0.3.0~rc1+dfsg/debian/changelog 2018-12-19 10:42:57.000000000 +0000 @@ -1,3 +1,25 @@ +python-pcl (0.3.0~rc1+dfsg-7) unstable; urgency=medium + + * Revert "Fix vtk include path" + * Depend on new PCL (due to new VTK include path) + + -- Jochen Sprickerhof Wed, 19 Dec 2018 11:42:57 +0100 + +python-pcl (0.3.0~rc1+dfsg-6) unstable; urgency=medium + + * Fix vtk include path + + -- Jochen Sprickerhof Tue, 11 Dec 2018 21:16:28 +0100 + +python-pcl (0.3.0~rc1+dfsg-5) unstable; urgency=medium + + * Update Maintainer/Uploaders + * Enable visualization module + * Remove ConditionalRemoval API and add deprecation notice + * Add support for PCL 1.9 + + -- Jochen Sprickerhof Tue, 11 Dec 2018 07:32:44 +0100 + python-pcl (0.3.0~rc1+dfsg-4) unstable; urgency=medium * Add support for multiple Python versions. diff -Nru python-pcl-0.3.0~rc1+dfsg/debian/clean python-pcl-0.3.0~rc1+dfsg/debian/clean --- python-pcl-0.3.0~rc1+dfsg/debian/clean 2018-10-14 17:04:37.000000000 +0000 +++ python-pcl-0.3.0~rc1+dfsg/debian/clean 2018-12-19 10:42:57.000000000 +0000 @@ -1 +1,2 @@ pcl/_*.cpp +pcl/pcl_visualization.cpp diff -Nru python-pcl-0.3.0~rc1+dfsg/debian/control python-pcl-0.3.0~rc1+dfsg/debian/control --- python-pcl-0.3.0~rc1+dfsg/debian/control 2018-10-14 17:04:37.000000000 +0000 +++ python-pcl-0.3.0~rc1+dfsg/debian/control 2018-12-19 10:42:57.000000000 +0000 @@ -1,8 +1,9 @@ Source: python-pcl Section: python Priority: optional -Maintainer: Jochen Sprickerhof -Build-Depends: debhelper (>=11~), dh-python, python3-all-dev, cython3, libpcl-dev, python3-numpy, python3-setuptools, +Maintainer: Debian Python Modules Team +Uploaders: Jochen Sprickerhof +Build-Depends: debhelper (>=11~), dh-python, python3-all-dev, cython3, libpcl-dev (>=1.9.1), python3-numpy, python3-setuptools, Standards-Version: 4.2.1 Rules-Requires-Root: no Homepage: https://strawlab.github.io/python-pcl/ diff -Nru python-pcl-0.3.0~rc1+dfsg/debian/patches/0002-Enable-visualization-module.patch python-pcl-0.3.0~rc1+dfsg/debian/patches/0002-Enable-visualization-module.patch --- python-pcl-0.3.0~rc1+dfsg/debian/patches/0002-Enable-visualization-module.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-pcl-0.3.0~rc1+dfsg/debian/patches/0002-Enable-visualization-module.patch 2018-12-19 10:42:57.000000000 +0000 @@ -0,0 +1,107 @@ +From: Jochen Sprickerhof +Date: Sun, 9 Dec 2018 19:01:14 +0100 +Subject: Enable visualization module + +https://build.opensuse.org/package/view_file/science/python-pcl/visualization18.patch +--- + pcl/pcl_visualization_defs.pxd | 12 ++++++------ + pcl/pxi/Visualization/PCLVisualizering.pxi | 12 ++++++------ + setup.py | 6 +++--- + 3 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/pcl/pcl_visualization_defs.pxd b/pcl/pcl_visualization_defs.pxd +index 81fe113..8b55e97 100644 +--- a/pcl/pcl_visualization_defs.pxd ++++ b/pcl/pcl_visualization_defs.pxd +@@ -752,8 +752,8 @@ cdef extern from "pcl/visualization/pcl_visualizer.h" namespace "pcl::visualizat + # param[in] scale the scale of the axes (default: 1) + # param[in] viewport the view port where the 3D axes should be added (default: all) + # +- # void addCoordinateSystem (double scale = 1.0, int viewport = 0); +- void addCoordinateSystem (double scale, int viewport) ++ # void addCoordinateSystem (double scale = 1.0, const string &id = "reference", int viewport = 0); ++ void addCoordinateSystem (double scale, const string &id, int viewport) + + # brief Adds 3D axes describing a coordinate system to screen at x, y, z + # param[in] scale the scale of the axes (default: 1) +@@ -762,8 +762,8 @@ cdef extern from "pcl/visualization/pcl_visualizer.h" namespace "pcl::visualizat + # param[in] z the Z position of the axes + # param[in] viewport the view port where the 3D axes should be added (default: all) + # +- # void addCoordinateSystem (double scale, float x, float y, float z, int viewport = 0); +- void addCoordinateSystem (double scale, float x, float y, float z, int viewport) ++ # void addCoordinateSystem (double scale, float x, float y, float z, const string &id = "reference", int viewport = 0); ++ void addCoordinateSystem (double scale, float x, float y, float z, const string &id, int viewport) + + # brief Adds 3D axes describing a coordinate system to screen at x, y, z, Roll,Pitch,Yaw + # param[in] scale the scale of the axes (default: 1) +@@ -797,8 +797,8 @@ cdef extern from "pcl/visualization/pcl_visualizer.h" namespace "pcl::visualizat + + # brief Removes a previously added 3D axes (coordinate system) + # param[in] viewport view port where the 3D axes should be removed from (default: all) +- # bool removeCoordinateSystem (int viewport = 0); +- bool removeCoordinateSystem (int viewport) ++ # bool removeCoordinateSystem (const string &id = "reference", int viewport = 0); ++ bool removeCoordinateSystem(const string &id, int viewport) + + # brief Removes a Point Cloud from screen, based on a given ID. + # param[in] id the point cloud object id (i.e., given on \a addPointCloud) +diff --git a/pcl/pxi/Visualization/PCLVisualizering.pxi b/pcl/pxi/Visualization/PCLVisualizering.pxi +index a9cc89a..48238db 100644 +--- a/pcl/pxi/Visualization/PCLVisualizering.pxi ++++ b/pcl/pxi/Visualization/PCLVisualizering.pxi +@@ -38,17 +38,17 @@ cdef class PCLVisualizering: + def SpinOnce(self, int millis_to_wait = 1, bool force_redraw = False): + self.thisptr().spinOnce (millis_to_wait, force_redraw) + +- def AddCoordinateSystem(self, double scale = 1.0, int viewpoint = 0): +- self.thisptr().addCoordinateSystem(scale, viewpoint) ++ def AddCoordinateSystem(self, double scale = 1.0, const string &id = "reference", int viewpoint = 0): ++ self.thisptr().addCoordinateSystem(scale, id, viewpoint) + +- def AddCoordinateSystem(self, double scale, float x, float y, float z, int viewpoint = 0): +- self.thisptr().addCoordinateSystem(scale, x, y, z, viewpoint) ++ def AddCoordinateSystem(self, double scale, float x, float y, float z, const string &id = "reference", int viewpoint = 0): ++ self.thisptr().addCoordinateSystem(scale, x, y, z, id, viewpoint) + + # void addCoordinateSystem (double scale, const eigen3.Affine3f& t, int viewport) + + # return bool +- def removeCoordinateSystem (self, int viewport): +- return self.thisptr().removeCoordinateSystem (viewport) ++ def removeCoordinateSystem (self, const string &id = "reference",int viewport = 0): ++ return self.thisptr().removeCoordinateSystem (id, viewport) + + # return bool + def RemovePointCloud(self, string id, int viewport): +diff --git a/setup.py b/setup.py +index 8796770..0493ccc 100644 +--- a/setup.py ++++ b/setup.py +@@ -4,7 +4,7 @@ from collections import defaultdict + from Cython.Distutils import build_ext + from distutils.core import setup + from distutils.extension import Extension +-# from Cython.Build import cythonize # MacOS NG ++from Cython.Build import cythonize + from setuptools import setup, find_packages, Extension + + import subprocess +@@ -546,7 +546,7 @@ else: + # ext_args['include_dirs'].append('/usr/include/vtk') + # ext_args['include_dirs'].append('/usr/local/include/vtk') + # pcl 1.7(Ubuntu) +- ext_args['include_dirs'].append('/usr/include/vtk-5.8') ++ ext_args['include_dirs'].append('/usr/include/vtk-7.1') + ext_args['library_dirs'].append('/usr/lib') + # ext_args['libraries'].append('libvtk*.so') + # pcl 1.8.1(MacOSX) +@@ -609,7 +609,7 @@ else: + ] + elif pcl_version == '-1.8': + module = [Extension("pcl._pcl", ["pcl/_pcl_180.pyx", "pcl/minipcl.cpp", "pcl/ProjectInliers.cpp"], language="c++", **ext_args), +- # Extension("pcl.pcl_visualization", ["pcl/pcl_visualization.pyx"], language="c++", **ext_args), ++ Extension("pcl.pcl_visualization", ["pcl/pcl_visualization.pyx"], language="c++", extra_compile_args=['-std=c++11','-fno-strict-aliasing'], **ext_args), + # Extension("pcl.pcl_grabber", ["pcl/pcl_grabber.pyx", "pcl/grabber_callback.cpp"], language="c++", **ext_args), + # debug + # gdb_debug=True, diff -Nru python-pcl-0.3.0~rc1+dfsg/debian/patches/0003-Remove-ConditionalRemoval-API-and-add-deprecation-no.patch python-pcl-0.3.0~rc1+dfsg/debian/patches/0003-Remove-ConditionalRemoval-API-and-add-deprecation-no.patch --- python-pcl-0.3.0~rc1+dfsg/debian/patches/0003-Remove-ConditionalRemoval-API-and-add-deprecation-no.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-pcl-0.3.0~rc1+dfsg/debian/patches/0003-Remove-ConditionalRemoval-API-and-add-deprecation-no.patch 2018-12-19 10:42:57.000000000 +0000 @@ -0,0 +1,141 @@ +From: Jochen Sprickerhof +Date: Sun, 9 Dec 2018 18:38:40 +0100 +Subject: Remove ConditionalRemoval API and add deprecation notice + +--- + examples/official/Filtering/remove_outliers.py | 3 ++- + pcl/pcl_filters_180.pxd | 4 ---- + pcl/pxi/Filters/ConditionalRemoval_180.pxi | 12 +++++++++++- + pcl/pxi/PointCloud_PointXYZ_180.pxi | 13 +++++++++++++ + pcl/pxi/PointCloud_SensorPoint.pxi | 12 ++++++++++++ + tests/test_filters.py | 3 ++- + 6 files changed, 40 insertions(+), 7 deletions(-) + +diff --git a/examples/official/Filtering/remove_outliers.py b/examples/official/Filtering/remove_outliers.py +index b586737..fd1da1a 100644 +--- a/examples/official/Filtering/remove_outliers.py ++++ b/examples/official/Filtering/remove_outliers.py +@@ -86,7 +86,8 @@ elif args.Removal == 'Condition': + range_cond.add_Comparison2('z', pcl.CythonCompareOp_Type.LT, 0.8) + + # build the filter +- condrem = cloud.make_ConditionalRemoval(range_cond) ++ condrem = cloud.make_ConditionalRemoval() ++ condrem.set_Condition(range_cond) + condrem.set_KeepOrganized(True) + # apply filter + cloud_filtered = condrem.filter () +diff --git a/pcl/pcl_filters_180.pxd b/pcl/pcl_filters_180.pxd +index c272819..cb6f075 100644 +--- a/pcl/pcl_filters_180.pxd ++++ b/pcl/pcl_filters_180.pxd +@@ -616,10 +616,6 @@ cdef extern from "pcl/filters/conditional_removal.h" namespace "pcl": + ConditionalRemoval(int) + # ConditionalRemoval (ConditionBasePtr condition, bool extract_removed_indices = false) + # python invalid default param ? +- ConditionalRemoval (ConditionBasePtr_t condition, bool extract_removed_indices = false) +- ConditionalRemoval (ConditionBase_PointXYZI_Ptr_t condition, bool extract_removed_indices = false) +- ConditionalRemoval (ConditionBase_PointXYZRGB_Ptr_t condition, bool extract_removed_indices = false) +- ConditionalRemoval (ConditionBase_PointXYZRGBA_Ptr_t condition, bool extract_removed_indices = false) + # [with PointT = pcl::PointXYZ, pcl::ConditionalRemoval::ConditionBasePtr = boost::shared_ptr >] + # is deprecated (declared at /usr/include/pcl-1.7/pcl/filters/conditional_removal.h:632): ConditionalRemoval(ConditionBasePtr condition, bool extract_removed_indices = false) is deprecated, + # please use the setCondition (ConditionBasePtr condition) function instead. [-Wdeprecated-declarations] +diff --git a/pcl/pxi/Filters/ConditionalRemoval_180.pxi b/pcl/pxi/Filters/ConditionalRemoval_180.pxi +index 88a5e6d..5e25b37 100644 +--- a/pcl/pxi/Filters/ConditionalRemoval_180.pxi ++++ b/pcl/pxi/Filters/ConditionalRemoval_180.pxi +@@ -19,7 +19,14 @@ cdef class ConditionalRemoval: + def __cinit__(self, ConditionAnd cond): + # self.me = new pclfil.ConditionalRemoval_t(cond.me) + # direct - NG +- self.me = new pclfil.ConditionalRemoval_t(cond.me) ++ from warnings import warn ++ warn("constructor with condition is deprecated, use setCondition()", ++ DeprecationWarning) ++ self.me = new pclfil.ConditionalRemoval_t() ++ self.me.setCondition(cond.me) ++ ++ def __cinit__(self): ++ self.me = new pclfil.ConditionalRemoval_t() + + # def __dealloc__(self): + # # MemoryAccessError +@@ -29,6 +36,9 @@ cdef class ConditionalRemoval: + def set_KeepOrganized(self, flag): + self.me.setKeepOrganized(flag) + ++ def set_Condition(self, ConditionAnd cond): ++ self.me.setCondition(cond.me) ++ + def filter(self): + """ + Apply the filter according to the previously set parameters and return +diff --git a/pcl/pxi/PointCloud_PointXYZ_180.pxi b/pcl/pxi/PointCloud_PointXYZ_180.pxi +index 7956c5c..f386e9c 100644 +--- a/pcl/pxi/PointCloud_PointXYZ_180.pxi ++++ b/pcl/pxi/PointCloud_PointXYZ_180.pxi +@@ -468,10 +468,23 @@ cdef class PointCloud: + cdef pclfil.ConditionAnd_t *cCondAnd = condAnd.me + return condAnd + ++ def make_ConditionalRemoval(self): ++ """ ++ Return a pcl.ConditionalRemoval object with this object set as the input-cloud ++ """ ++ condRemoval = ConditionalRemoval() ++ cdef pclfil.ConditionalRemoval_t *cCondRemoval = condRemoval.me ++ cCondRemoval.setInputCloud( self.thisptr_shared) ++ return condRemoval ++ + def make_ConditionalRemoval(self, ConditionAnd range_conf): + """ + Return a pcl.ConditionalRemoval object with this object set as the input-cloud + """ ++ from warnings import warn ++ warn("constructor with condition is deprecated, use setCondition()", ++ DeprecationWarning) ++ + condRemoval = ConditionalRemoval(range_conf) + cdef pclfil.ConditionalRemoval_t *cCondRemoval = condRemoval.me + cCondRemoval.setInputCloud( self.thisptr_shared) +diff --git a/pcl/pxi/PointCloud_SensorPoint.pxi b/pcl/pxi/PointCloud_SensorPoint.pxi +index e26fca6..b8a5d79 100644 +--- a/pcl/pxi/PointCloud_SensorPoint.pxi ++++ b/pcl/pxi/PointCloud_SensorPoint.pxi +@@ -466,10 +466,22 @@ cdef class PointCloud2: + cdef pclfil.ConditionAnd_t *cCondAnd = condAnd.me + return condAnd + ++ def make_ConditionalRemoval(self): ++ """ ++ Return a pcl.ConditionalRemoval object with this object set as the input-cloud ++ """ ++ condRemoval = ConditionalRemoval() ++ cdef pclfil.ConditionalRemoval_t *cCondRemoval = condRemoval.me ++ cCondRemoval.setInputCloud( self.thisptr_shared) ++ return condRemoval ++ + def make_ConditionalRemoval(self, ConditionAnd range_conf): + """ + Return a pcl.ConditionalRemoval object with this object set as the input-cloud + """ ++ warn("constructor with condition is deprecated, use setCondition()", ++ DeprecationWarning) ++ + condRemoval = ConditionalRemoval(range_conf) + cdef pclfil.ConditionalRemoval_t *cCondRemoval = condRemoval.me + cCondRemoval.setInputCloud( self.thisptr_shared) +diff --git a/tests/test_filters.py b/tests/test_filters.py +index 3c0c605..db40671 100644 +--- a/tests/test_filters.py ++++ b/tests/test_filters.py +@@ -62,7 +62,8 @@ class TestConditionalRemoval(unittest.TestCase): + # self.p = pcl.load("tests" + os.path.sep + "flydracyl.pcd") + # self.p = pcl.PointCloud(_data) + self.p = pcl.PointCloud(_data2) +- self.fil = self.p.make_ConditionalRemoval(pcl.ConditionAnd()) ++ self.fil = self.p.make_ConditionalRemoval() ++ self.fil.set_Condition(pcl.ConditionAnd()) + + # result + # nan nan nan diff -Nru python-pcl-0.3.0~rc1+dfsg/debian/patches/0004-Add-support-for-PCL-1.9.patch python-pcl-0.3.0~rc1+dfsg/debian/patches/0004-Add-support-for-PCL-1.9.patch --- python-pcl-0.3.0~rc1+dfsg/debian/patches/0004-Add-support-for-PCL-1.9.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-pcl-0.3.0~rc1+dfsg/debian/patches/0004-Add-support-for-PCL-1.9.patch 2018-12-19 10:42:57.000000000 +0000 @@ -0,0 +1,35 @@ +From: Jochen Sprickerhof +Date: Sun, 9 Dec 2018 19:02:37 +0100 +Subject: Add support for PCL 1.9 + +--- + setup.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 0493ccc..84addab 100644 +--- a/setup.py ++++ b/setup.py +@@ -510,7 +510,7 @@ else: + os.environ['ARCHFLAGS'] = '' + + # Try to find PCL. XXX we should only do this when trying to build or install. +- PCL_SUPPORTED = ["-1.8", "-1.7", "-1.6", ""] # in order of preference ++ PCL_SUPPORTED = ["-1.9", "-1.8", "-1.7", "-1.6", ""] # in order of preference + + for pcl_version in PCL_SUPPORTED: + if subprocess.call(['pkg-config', 'pcl_common%s' % pcl_version]) == 0: +@@ -614,6 +614,13 @@ else: + # debug + # gdb_debug=True, + ] ++ elif pcl_version == '-1.9': ++ module = [Extension("pcl._pcl", ["pcl/_pcl_180.pyx", "pcl/minipcl.cpp", "pcl/ProjectInliers.cpp"], language="c++", **ext_args), ++ Extension("pcl.pcl_visualization", ["pcl/pcl_visualization.pyx"], language="c++", extra_compile_args=['-std=c++11','-fno-strict-aliasing'], **ext_args), ++ # Extension("pcl.pcl_grabber", ["pcl/pcl_grabber.pyx", "pcl/grabber_callback.cpp"], language="c++", **ext_args), ++ # debug ++ # gdb_debug=True, ++ ] + else: + print('no pcl install or pkg-config missed.') + sys.exit(1) diff -Nru python-pcl-0.3.0~rc1+dfsg/debian/patches/series python-pcl-0.3.0~rc1+dfsg/debian/patches/series --- python-pcl-0.3.0~rc1+dfsg/debian/patches/series 2018-10-14 17:04:37.000000000 +0000 +++ python-pcl-0.3.0~rc1+dfsg/debian/patches/series 2018-12-19 10:42:57.000000000 +0000 @@ -1 +1,4 @@ 0001-Mark-PCLBase-as-nogil-to-fix-compilation.patch +0002-Enable-visualization-module.patch +0003-Remove-ConditionalRemoval-API-and-add-deprecation-no.patch +0004-Add-support-for-PCL-1.9.patch