[Git][debian-gis-team/python-pdal][upstream] 2 commits: New upstream version 2.1.0~rc2+ds

Bas Couwenberg gitlab at salsa.debian.org
Thu Nov 1 13:50:38 GMT 2018


Bas Couwenberg pushed to branch upstream at Debian GIS Project / python-pdal


Commits:
c5eeda18 by Bas Couwenberg at 2018-10-31T21:30:42Z
New upstream version 2.1.0~rc2+ds
- - - - -
8ce7620c by Bas Couwenberg at 2018-11-01T13:23:00Z
New upstream version 2.1.0~rc3+ds
- - - - -


8 changed files:

- PKG-INFO
- VERSION.txt
- pdal/PyPipeline.cpp
- pdal/__init__.py
- pdal/libpdalpython.cpp
- pdal/libpdalpython.pyx
- setup.py
- test/test_pipeline.py


Changes:

=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: PDAL
-Version: 2.1.0rc1
+Version: 2.1.0rc3
 Summary: Point cloud data processing
 Home-page: http://pdal.io
 Author: Howard Butler


=====================================
VERSION.txt
=====================================
@@ -1 +1 @@
-2.1.0rc1
\ No newline at end of file
+2.1.0rc3
\ No newline at end of file


=====================================
pdal/PyPipeline.cpp
=====================================
@@ -47,6 +47,7 @@
 
 #include "PyArray.hpp"
 #include <pdal/Stage.hpp>
+#include <pdal/pdal_features.hpp>
 #include <pdal/PipelineWriter.hpp>
 #include <pdal/io/NumpyReader.hpp>
 
@@ -78,6 +79,7 @@ Pipeline::Pipeline(std::string const& json, std::vector<Array*> arrays)
     if (!r)
         throw pdal::pdal_error("pipeline had no stages!");
 
+#if PDAL_VERSION_MAJOR > 1 || PDAL_VERSION_MINOR >=8
     int counter = 1;
     for (auto array: arrays)
     {
@@ -102,6 +104,7 @@ Pipeline::Pipeline(std::string const& json, std::vector<Array*> arrays)
         counter++;
 
     }
+#endif
 
     manager.validateStageOptions();
 }


=====================================
pdal/__init__.py
=====================================
@@ -1,5 +1,18 @@
-__version__='2.1.0rc1'
+__version__='2.1.0rc3'
 
 from .pipeline import Pipeline
 from .array import Array
 from .dimension import dimensions
+
+from pdal.libpdalpython import getVersionString, getVersionMajor, getVersionMinor, getVersionPatch, getSha1, getDebugInformation, getPluginInstallPath
+
+class Info(object):
+    version = getVersionString()
+    major = getVersionMajor()
+    minor = getVersionMinor()
+    patch = getVersionPatch()
+    debug = getDebugInformation()
+    sha1 = getSha1()
+    plugin = getPluginInstallPath()
+
+info = Info()


=====================================
pdal/libpdalpython.cpp
=====================================
The diff for this file was not included because it is too large.

=====================================
pdal/libpdalpython.pyx
=====================================
@@ -12,6 +12,30 @@ np.import_array()
 from cpython cimport PyObject, Py_INCREF
 from cython.operator cimport dereference as deref, preincrement as inc
 
+cdef extern from "pdal/pdal_config.hpp" namespace "pdal::Config":
+    cdef int versionMajor() except +
+    cdef int versionMinor() except +
+    cdef int versionPatch() except +
+    cdef string sha1() except+
+    cdef string debugInformation() except+
+    cdef string pluginInstallPath() except+
+    cdef string versionString() except+
+
+def getVersionString():
+    return versionString()
+
+def getVersionMajor():
+    return versionMajor()
+def getVersionMinor():
+    return versionMinor()
+def getVersionPatch():
+    return versionPatch()
+def getSha1():
+    return sha1()
+def getDebugInformation():
+    return debugInformation()
+def getPluginInstallPath():
+    return pluginInstallPath()
 
 cdef extern from "PyArray.hpp" namespace "pdal::python":
     cdef cppclass Array:
@@ -32,6 +56,8 @@ cdef extern from "PyPipeline.hpp" namespace "libpdalpython":
         int getLogLevel()
         void setLogLevel(int)
 
+
+
 cdef class PyArray:
     cdef Array *thisptr
     def __cinit__(self, object array):


=====================================
setup.py
=====================================
@@ -108,13 +108,9 @@ libraries = []
 extra_link_args = []
 extra_compile_args = []
 
-if os.name in ['nt']:
-    library_dirs = ['c:/OSGeo4W64/lib']
-    libraries = ['pdalcpp','pdal_plugin_reader_numpy','pdal_util','ws2_32']
-    extra_compile_args = ['/DNOMINMAX',]
-
 from setuptools.extension import Extension as DistutilsExtension
 
+PDALVERSION = None
 if pdal_config and "clean" not in sys.argv:
     # Collect other options from PDAL
     try:
@@ -134,6 +130,7 @@ if pdal_config and "clean" not in sys.argv:
     # older versions of pdal-config do not include --python-version switch
     except ValueError:
         pass
+    PDALVERSION = Version(get_pdal_config('--version'))
 
     separator = ':'
     if os.name in ['nt']:
@@ -162,7 +159,19 @@ if DEBUG:
     if os.name != 'nt':
         extra_compile_args += ['-g','-O0']
 
-libraries.append('pdal_plugin_reader_numpy')
+if os.name in ['nt']:
+    if os.environ['OSGEO4W_ROOT']:
+        library_dirs = ['c:/OSGeo4W64/lib']
+    libraries = ['pdalcpp','pdal_util','ws2_32']
+    if PDALVERSION >= Version('1.8'):
+        libraries.append('pdal_plugin_reader_numpy')
+    extra_compile_args = ['/DNOMINMAX',]
+
+
+# readers.numpy doesn't exist until PDAL 1.8
+if PDALVERSION >= Version('1.8'):
+    libraries.append('pdal_plugin_reader_numpy')
+
 sources=['pdal/libpdalpython'+ext, "pdal/PyPipeline.cpp"  ]
 extensions = [DistutilsExtension("*",
                                    sources,


=====================================
test/test_pipeline.py
=====================================
@@ -2,6 +2,7 @@ import unittest
 import pdal
 import os
 import numpy as np
+from packaging.version import Version
 
 DATADIRECTORY = "./test/data"
 
@@ -127,8 +128,12 @@ class TestPipeline(PDALTest):
 #
 class TestArrayLoad(PDALTest):
 
+    @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'perlin.npy')),
+            "missing test data")
     def test_merged_arrays(self):
         """Can we load data from a a list of arrays to PDAL"""
+        if Version(pdal.info.version) < Version('1.8'):
+            return True
         data = np.load(os.path.join(DATADIRECTORY, 'perlin.npy'))
 
         arrays = [data, data, data]
@@ -157,7 +162,10 @@ class TestDimensions(PDALTest):
     def test_fetch_dimensions(self):
         """Ask PDAL for its valid dimensions list"""
         dims = pdal.dimensions
-        self.assertEqual(len(dims), 72)
+        if Version(pdal.info.version) < Version('1.8'):
+            self.assertEqual(len(dims), 71)
+        else:
+            self.assertEqual(len(dims), 72)
 
 def test_suite():
     return unittest.TestSuite(



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pdal/compare/7bf8b61b4f70b9651624776e14824fca32045122...8ce7620c84d808333e9e0a27f64d4b0dcc22ff3c

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pdal/compare/7bf8b61b4f70b9651624776e14824fca32045122...8ce7620c84d808333e9e0a27f64d4b0dcc22ff3c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20181101/fcc6b017/attachment-0001.html>


More information about the Pkg-grass-devel mailing list