[Git][debian-gis-team/pyosmium][master] 2 commits: Add upstream patch to fix FTBFS with pybind 2.11.

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Wed Jul 26 16:15:57 BST 2023



Bas Couwenberg pushed to branch master at Debian GIS Project / pyosmium


Commits:
1ece570a by Bas Couwenberg at 2023-07-26T17:09:11+02:00
Add upstream patch to fix FTBFS with pybind 2.11.

- - - - -
89f35c7b by Bas Couwenberg at 2023-07-26T17:15:46+02:00
Update lintian overrides.

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/pybind-2.11.patch
- debian/patches/series
- + debian/pyosmium.lintian-overrides


Changes:

=====================================
debian/changelog
=====================================
@@ -4,6 +4,8 @@ pyosmium (3.6.0-2) UNRELEASED; urgency=medium
   * Don't override dh_auto_install.
   * Use autopkgtest-pkg-pybuild testsuite.
   * Enable Salsa CI.
+  * Add upstream patch to fix FTBFS with pybind 2.11.
+  * Update lintian overrides.
 
  -- Bas Couwenberg <sebastic at debian.org>  Tue, 13 Jun 2023 08:41:20 +0200
 


=====================================
debian/patches/pybind-2.11.patch
=====================================
@@ -0,0 +1,51 @@
+Description: Compatibility with recent pybind versions
+ Work-around false positive added by pybind/pybind11 at f701654 change:
+ ItemIterator/CollectionIterator ARE copy/move constructible, even if their template
+ parameter is not.
+ .
+ Enabled for pybind version >= 2.11.
+From: Aurélien Grenotton <agrenott at gmail.com>
+Origin: https://github.com/osmcode/pyosmium/commit/31b1363389b423f49e14140ce868ecac83e92f69
+Forwarded: not-needed
+
+--- a/lib/osm.cc
++++ b/lib/osm.cc
+@@ -18,6 +18,38 @@ namespace py = pybind11;
+ using TagIterator = osmium::TagList::const_iterator;
+ using MemberIterator = osmium::RelationMemberList::const_iterator;
+ 
++#if PYBIND11_VERSION_MINOR >= 11 || PYBIND11_VERSION_MAJOR > 2
++/*
++Work-around false positive added by pybind/pybind11 at f701654 change:
++ItemIterator/CollectionIterator ARE copy/move constructible, even if their template
++parameter is not. Indeed, those iterators iterate over low-level memory representation
++of the objects, without relying on their constructors.
++
++For eg.
++// static_assert(std::is_move_constructible<osmium::memory::CollectionIterator<osmium::RelationMember const>>::value);
++// static_assert(!std::is_copy_constructible<osmium::RelationMember>::value);
++
++The work-around relies on officially exposed pybind11::detail::is_copy_constructible/is_copy_constructible: 
++https://github.com/pybind/pybind11/pull/4631
++*/
++namespace pybind11 {
++namespace detail {
++template <typename T>
++struct is_copy_constructible<osmium::memory::CollectionIterator<T>>
++    : std::true_type {};
++template <typename T>
++struct is_move_constructible<osmium::memory::CollectionIterator<T>>
++    : std::true_type {};
++template <typename T>
++struct is_copy_constructible<osmium::memory::ItemIterator<T>>
++    : std::true_type {};
++template <typename T>
++struct is_move_constructible<osmium::memory::ItemIterator<T>>
++    : std::true_type {};
++} // namespace detail
++} // namespace pybind11
++#endif
++
+ static py::object tag_iterator_next(TagIterator &it, TagIterator const &cend)
+ {
+     if (it == cend)


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 no-distutils.patch
+pybind-2.11.patch


=====================================
debian/pyosmium.lintian-overrides
=====================================
@@ -0,0 +1,2 @@
+# False positive
+groff-message * warning: cannot select font *



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyosmium/-/compare/e0dfa1b98a97acd4de97732d09bd455d9e4eaeb0...89f35c7bbf5e55cbfb86173754ae68ed5ec77b98

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyosmium/-/compare/e0dfa1b98a97acd4de97732d09bd455d9e4eaeb0...89f35c7bbf5e55cbfb86173754ae68ed5ec77b98
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/20230726/27b0b668/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list