[Git][debian-gis-team/pyosmium][stretch-backports] 24 commits: Strip trailing whitespace from control & rules files.

Bas Couwenberg gitlab at salsa.debian.org
Tue Aug 14 06:26:42 BST 2018


Bas Couwenberg pushed to branch stretch-backports at Debian GIS Project / pyosmium


Commits:
3674aa8a by Bas Couwenberg at 2018-05-07T19:54:50Z
Strip trailing whitespace from control & rules files.

- - - - -
7cc99de4 by Bas Couwenberg at 2018-07-05T09:02:09Z
Bump Standards-Version to 4.1.5, no changes.

- - - - -
e6a0ef1e by Bas Couwenberg at 2018-07-11T12:46:36Z
Set distribution to unstable.

- - - - -
0dee3adf by Bas Couwenberg at 2018-07-23T09:15:39Z
Update osmcode.org URLs to use HTTPS.

- - - - -
c906bc20 by Bas Couwenberg at 2018-08-05T18:47:58Z
Bump Standards-Version to 4.2.0, no changes.

- - - - -
853b15d6 by Bas Couwenberg at 2018-08-06T08:55:34Z
Drop autopkgtests to test installability & module import.

- - - - -
6756e0a6 by Bas Couwenberg at 2018-08-06T08:55:37Z
Add lintian override for testsuite-autopkgtest-missing.

- - - - -
3645c6aa by Bas Couwenberg at 2018-08-07T05:17:39Z
New upstream version 2.14.2
- - - - -
65b8a304 by Bas Couwenberg at 2018-08-07T05:17:42Z
Merge tag 'upstream/2.14.2'

Upstream version 2.14.2

- - - - -
230947f1 by Bas Couwenberg at 2018-08-07T05:17:58Z
New upstream release.

- - - - -
ead0563e by Bas Couwenberg at 2018-08-07T05:19:37Z
Bump minimum required libosmium2-dev to 2.14.2.

- - - - -
c389a76f by Bas Couwenberg at 2018-08-07T05:19:52Z
Set distribution to unstable.

- - - - -
99221281 by Bas Couwenberg at 2018-08-07T15:51:56Z
Ignore test failures on i386 & hurd-i386.

- - - - -
2ad99f92 by Bas Couwenberg at 2018-08-07T16:38:32Z
Set distribution to unstable.

- - - - -
f1ca5fee by Bas Couwenberg at 2018-08-07T19:33:12Z
Add upstream patch to fix test failure on i386.

- - - - -
50ae702e by Bas Couwenberg at 2018-08-07T19:34:06Z
Don't ignore test failures on i386 & hurd-i386.

Revert "Ignore test failures on i386 & hurd-i386."

This reverts commit 99221281b36e66119aa92a395b5b79740136019c.

- - - - -
4b675df1 by Bas Couwenberg at 2018-08-07T19:34:29Z
Set distribution to unstable.

- - - - -
0fa0d489 by Bas Couwenberg at 2018-08-08T20:53:16Z
New upstream version 2.14.3
- - - - -
e76aeaf3 by Bas Couwenberg at 2018-08-08T20:53:18Z
Merge tag 'upstream/2.14.3'

Upstream version 2.14.3

- - - - -
59c66ae5 by Bas Couwenberg at 2018-08-08T20:53:30Z
New upstream release.

- - - - -
6d1c06fb by Bas Couwenberg at 2018-08-08T20:54:20Z
Drop patch to fix i386 test failure, included upstream.

- - - - -
f49750cc by Bas Couwenberg at 2018-08-08T21:22:12Z
Set distribution to unstable.

- - - - -
8ebac78c by Bas Couwenberg at 2018-08-14T04:59:53Z
Merge tag 'debian/2.14.3-1' into stretch-backports

- - - - -
a6e52fda by Bas Couwenberg at 2018-08-14T05:00:08Z
Rebuild for stretch-backports.

- - - - -


12 changed files:

- CHANGELOG.md
- debian/changelog
- debian/control
- debian/copyright
- debian/rules
- + debian/source/lintian-overrides
- − debian/tests/control
- debian/upstream/metadata
- lib/geom.cc
- setup.py
- src/osmium/version.py
- test/test_geom.py


Changes:

=====================================
CHANGELOG.md
=====================================
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,29 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 
 ### Fixed
 
+## [2.14.3] - 2018-08-08
+
+### Added
+
+### Changed
+
+### Fixed
+
+- fix rounding error in tests
+
+## [2.14.2] - 2018-08-07
+
+### Added
+
+- expose Coordinates struct and mercator projection functions
+
+### Changed
+
+- use current libosmium and protozero
+
+### Fixed
+
+
 ## [2.14.1] - 2018-04-24
 
 ### Added


=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,47 @@
+pyosmium (2.14.3-1~bpo9+1) stretch-backports; urgency=medium
+
+  * Rebuild for stretch-backports.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 14 Aug 2018 07:00:03 +0200
+
+pyosmium (2.14.3-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Drop patch to fix i386 test failure, included upstream.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Wed, 08 Aug 2018 22:54:21 +0200
+
+pyosmium (2.14.2-3) unstable; urgency=medium
+
+  * Add upstream patch to fix test failure on i386.
+  * Don't ignore test failures on i386 & hurd-i386.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 07 Aug 2018 21:34:17 +0200
+
+pyosmium (2.14.2-2) unstable; urgency=medium
+
+  * Ignore test failures on i386 & hurd-i386.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 07 Aug 2018 18:37:29 +0200
+
+pyosmium (2.14.2-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Update osmcode.org URLs to use HTTPS.
+  * Bump Standards-Version to 4.2.0, no changes.
+  * Drop autopkgtests to test installability & module import.
+  * Add lintian override for testsuite-autopkgtest-missing.
+  * Bump minimum required libosmium2-dev to 2.14.2.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 07 Aug 2018 07:19:38 +0200
+
+pyosmium (2.14.1-2) unstable; urgency=medium
+
+  * Strip trailing whitespace from control & rules files.
+  * Bump Standards-Version to 4.1.5, no changes.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Wed, 11 Jul 2018 14:46:25 +0200
+
 pyosmium (2.14.1-1~bpo9+1) stretch-backports; urgency=medium
 
   * Rebuild for stretch-backports.


=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9),
                libexpat1-dev,
                libgdal-dev,
                libgeos++-dev,
-               libosmium2-dev (>= 2.14.0),
+               libosmium2-dev (>= 2.14.2),
                libsparsehash-dev,
                python-all-dev,
                python-setuptools,
@@ -23,10 +23,10 @@ Build-Depends: debhelper (>= 9),
                python3-nose,
                python3-sphinx,
                python3-sphinxcontrib.autoprogram
-Standards-Version: 4.1.4
+Standards-Version: 4.2.0
 Vcs-Browser: https://salsa.debian.org/debian-gis-team/pyosmium/
 Vcs-Git: https://salsa.debian.org/debian-gis-team/pyosmium.git -b stretch-backports
-Homepage: http://osmcode.org/pyosmium/
+Homepage: https://osmcode.org/pyosmium/
 
 Package: pyosmium
 Architecture: all
@@ -102,4 +102,3 @@ Description: Osmium library bindings for Python - Documentation
  functions.
  .
  This package contains the PyOsmium documentation.
-


=====================================
debian/copyright
=====================================
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,6 +1,6 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: PyOsmium
-Upstream-Contact: Osmium Developers (http://osmcode.org/contact)
+Upstream-Contact: Osmium Developers (https://osmcode.org/contact)
 Source: https://github.com/osmcode/pyosmium
 
 Files: *


=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -39,4 +39,3 @@ override_dh_install:
 
 	# Remove embedded underscore.js in favor of libjs-underscore
 	$(RM) debian/*/usr/share/doc/*/html/_static/underscore.js
-


=====================================
debian/source/lintian-overrides
=====================================
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,3 @@
+# Not worth the effort
+testsuite-autopkgtest-missing
+


=====================================
debian/tests/control deleted
=====================================
--- a/debian/tests/control
+++ /dev/null
@@ -1,11 +0,0 @@
-# Test installability
-Depends: @
-Test-Command: /bin/true
-
-# Test module import (Python 2)
-Depends: python-all, python-pyosmium
-Test-Command: set -e ; for py in $(pyversions -r 2>/dev/null) ; do cd "$ADTTMP" ; echo "Testing with $py:" ; $py -c "import osmium; print(osmium)" ; done
-
-# Test module import (Python 3)
-Depends: python3-all, python3-pyosmium
-Test-Command: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd "$ADTTMP" ; echo "Testing with $py:" ; $py -c "import osmium; print(osmium)" ; done


=====================================
debian/upstream/metadata
=====================================
--- a/debian/upstream/metadata
+++ b/debian/upstream/metadata
@@ -1,7 +1,7 @@
 ---
 Bug-Database: https://github.com/osmcode/pyosmium/issues
 Bug-Submit: https://github.com/osmcode/pyosmium/issues/new
-Contact: Osmium Developers (http://osmcode.org/contact)
+Contact: Osmium Developers (https://osmcode.org/contact)
 Name: PyOsmium
 Repository: https://github.com/osmcode/pyosmium.git
 Repository-Browse: https://github.com/osmcode/pyosmium


=====================================
lib/geom.cc
=====================================
--- a/lib/geom.cc
+++ b/lib/geom.cc
@@ -1,5 +1,7 @@
 #include <boost/python.hpp>
 
+#include <osmium/geom/mercator_projection.hpp>
+#include <osmium/geom/coordinates.hpp>
 #include <osmium/geom/haversine.hpp>
 #include <osmium/geom/factory.hpp>
 #include <osmium/geom/wkb.hpp>
@@ -38,6 +40,23 @@ BOOST_PYTHON_MODULE(geom)
         "curvature of earth into account. If a :py:class:`WayNodeList` is given "
         "as a parameter the total length of the way in meters is computed.");
 
+    def("lonlat_to_mercator", &osmium::geom::lonlat_to_mercator,
+        arg("coordinate"),
+        "Convert coordinates from WGS84 to Mercator projection.");
+
+    def("mercator_to_lonlat", &osmium::geom::mercator_to_lonlat,
+        arg("coordinate"),
+        "Convert coordinates from WGS84 to Mercator projection.");
+
+    class_<osmium::geom::Coordinates>("Coordinates",
+        "A pair of coordiante values.")
+        .def(init<double, double>())
+        .def(init<osmium::Location const &>())
+        .add_property("x", &osmium::geom::Coordinates::x)
+        .add_property("y", &osmium::geom::Coordinates::y)
+        .def("valid", &osmium::geom::Coordinates::valid,
+             "Coordinates are invalid if they have been default constructed.");
+
     class_<WKBFactory>("WKBFactory",
         "Factory that creates WKB from osmium geometries.")
         .add_property("epsg", &WKBFactory::epsg,


=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -5,6 +5,7 @@ from subprocess import call
 from sys import version_info as pyversion, platform as osplatform
 from ctypes.util import find_library
 import os
+import os.path as osp
 
 includes = []
 libs = []
@@ -37,6 +38,30 @@ def get_versions():
 
     return v['pyosmium_release'], v['libosmium_version'], v['protozero_version']
 
+
+def find_includes(libname, chk_file=None, prefix=None, version_postfix=None):
+    if chk_file is None:
+        chk_file = osp.join('include', libname, 'version.hpp')
+
+    if prefix is not None:
+        if not os.path.isfile(osp.join(prefix, chk_file)):
+            raise RuntimeError("Prefix for %s set but library not found in '%s'."
+                               % (libname, prefix))
+        return osp.join(prefix, 'include')
+
+    search_paths = []
+    if version_postfix:
+        search_paths.append('%s-%s' % (libname, version_postfix))
+    search_paths.append(osp.join('..', libname))
+
+    for p in search_paths:
+        if os.path.isfile(osp.join(p, chk_file)):
+            print("%s found in '%s'." % (libname, p))
+            return osp.join(p, 'include')
+
+    print("Using global %s" % libname)
+
+
 pyosmium_release, libosmium_version, protozero_version = get_versions()
 
 ## boost dependencies
@@ -45,12 +70,21 @@ boost_prefix = os.environ.get('BOOST_PREFIX',
 
 includes.append(os.path.join(boost_prefix, 'include'))
 if 'BOOST_VERSION' in os.environ:
-    includes.append(os.path.join(boost_prefix, 'include',
-                                 "boost-%s" %os.environ['BOOST_VERSION']))
+    for boost_dir in ('boost-%s', 'boost%s'):
+        if os.path.isdir(os.path.join(boost_prefix, 'include', boost_dir % os.environ['BOOST_VERSION'])):
+            includes.append(os.path.join(boost_prefix, 'include', boost_dir %os.environ['BOOST_VERSION']))
+            break
+    else:
+        raise Exception("Cannot find boost headers")
+elif 'BOOST_PREFIX' in os.environ:
+    if os.path.isdir(os.path.join(boost_prefix, 'include', 'boost')):
+        includes.append(os.path.join(boost_prefix, 'include', 'boost'))
+    else:
+        raise Exception("Cannot find boost headers")
 
-if 'BOOST_VERSION' in os.environ:
+if 'BOOST_PREFIX' in os.environ:
     libdirs.append(os.path.join(boost_prefix, 'lib'))
-elif osplatform in ["linux", "linux2"]:
+elif osplatform in ["linux", "linux2"] and os.path.isdir('/usr/lib/x86_64-linux-gnu/'):
     libdirs.append('/usr/lib/x86_64-linux-gnu/')
 else:
     libdirs.append(os.path.join(boost_prefix, 'lib'))
@@ -100,28 +134,19 @@ if osplatform != "win32":
     setuptools_build_ext.customize_compiler = cpp_compiler
 
 ### osmium dependencies
-osmium_prefixes = [ 'libosmium-' + libosmium_version, '../libosmium' ]
-if 'LIBOSMIUM_PREFIX' in os.environ:
-    lo_version_h = os.path.join(os.environ['LIBOSMIUM_PREFIX'],
-                                'include/osmium/version.hpp')
-    if not os.path.isfile(lo_version_h):
-        raise RuntimeError("LIBOSMIUM_PREFIX is set but no libosmium was found in '%s'" % os.environ['LIBOSMIUM_PREFIX'])
-    includes.insert(0, os.path.join(os.environ['LIBOSMIUM_PREFIX'], 'include'))
-else:
-    # default search paths for libosmium
-    for prefix in [ 'libosmium-' + libosmium_version, '../libosmium' ]:
-        if os.path.isfile(os.path.join(prefix, 'include/osmium/version.hpp')):
-            print("libosmium found in '%s'" % prefix)
-            includes.insert(0, os.path.join(prefix, 'include'))
-            break
-    else:
-        print("Using global libosmium.")
+osmium_inc = find_includes('libosmium',
+                           chk_file=osp.join('include', 'osmium', 'version.hpp'),
+                           prefix=os.environ.get('LIBOSMIUM_PREFIX'),
+                           version_postfix=libosmium_version)
+if osmium_inc is not None:
+    includes.insert(0, osmium_inc)
 
 ### protozero dependencies
-for prefix in [ 'protozero-' + protozero_version, '../protozero' ]:
-    if os.path.isfile(os.path.join(prefix, 'include/protozero/version.hpp')):
-        print("protozero found in '%s'" % prefix)
-        includes.insert(0, os.path.join(prefix, 'include'))
+protozero_inc = find_includes('protozero',
+                              prefix=os.environ.get('PROTOZERO_PREFIX'),
+                              version_postfix=protozero_version)
+if protozero_inc is not None:
+    includes.insert(0, protozero_inc)
 
 if osplatform == "win32" :
     osmium_libs = ('expat', 'zlib', 'bzip2', 'ws2_32')
@@ -202,4 +227,3 @@ setup (name = 'osmium',
        cmdclass={'sdist' : My_sdist},
        ext_modules = extensions)
 
-


=====================================
src/osmium/version.py
=====================================
--- a/src/osmium/version.py
+++ b/src/osmium/version.py
@@ -5,9 +5,9 @@ Version information.
 # the major version
 pyosmium_major = '2.14'
 # current release (Pip version)
-pyosmium_release = '2.14.1'
+pyosmium_release = '2.14.3'
 
 # libosmium version shipped with the Pip release
-libosmium_version = '2.14.0'
+libosmium_version = '2.14.2'
 # protozero version shipped with the Pip release
-protozero_version = '1.6.2'
+protozero_version = '1.6.3'


=====================================
test/test_geom.py
=====================================
--- a/test/test_geom.py
+++ b/test/test_geom.py
@@ -51,3 +51,22 @@ class TestWkbCreatePoly(HandlerTestBase, unittest.TestCase):
 
     def check_result(self):
         assert_equals(1, len(self.handler.wkbs))
+
+class TestCoordinateConversion(unittest.TestCase):
+
+    def test_lonlat_to_mercator(self):
+        c = o.geom.lonlat_to_mercator(o.geom.Coordinates(0,0))
+        assert_almost_equals(c.x, 0)
+        assert_almost_equals(c.y, 0)
+
+    def test_mercator_lonlat(self):
+        c = o.geom.mercator_to_lonlat(o.geom.Coordinates(0,0))
+        assert_almost_equals(c.x, 0)
+        assert_almost_equals(c.y, 0)
+
+class TestCoordinates(unittest.TestCase):
+
+    def test_coordinate_from_location(self):
+        c = o.geom.Coordinates(o.osm.Location(10.0, -3.0))
+        assert_almost_equals(c.x, 10.0)
+        assert_almost_equals(c.y, -3.0)



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyosmium/compare/f26d6d4ebf0fa7b9d084ea8a680905c295e93487...a6e52fda599b8a3331bfc88b4bf2f480387b6420

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyosmium/compare/f26d6d4ebf0fa7b9d084ea8a680905c295e93487...a6e52fda599b8a3331bfc88b4bf2f480387b6420
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/20180814/2ae05b59/attachment-0001.html>


More information about the Pkg-grass-devel mailing list