[Git][debian-gis-team/pyosmium][bullseye-backports] 14 commits: Bump Standards-Version to 4.6.1, no changes.
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Tue Aug 2 06:03:26 BST 2022
Bas Couwenberg pushed to branch bullseye-backports at Debian GIS Project / pyosmium
Commits:
18f54591 by Bas Couwenberg at 2022-06-21T07:19:03+02:00
Bump Standards-Version to 4.6.1, no changes.
- - - - -
58903b41 by Bas Couwenberg at 2022-07-28T05:32:16+02:00
New upstream version 3.4.0
- - - - -
3e41305a by Bas Couwenberg at 2022-07-28T05:32:20+02:00
Update upstream source from tag 'upstream/3.4.0'
Update to upstream version '3.4.0'
with Debian dir 4ea569e751f3640167bd121e5aa52b5072247129
- - - - -
19e88095 by Bas Couwenberg at 2022-07-28T05:32:36+02:00
New upstream release.
- - - - -
df20719f by Bas Couwenberg at 2022-07-28T06:21:45+02:00
Add patch to fix doc build.
- - - - -
dc8b6ecf by Bas Couwenberg at 2022-07-28T06:21:45+02:00
Set distribution to unstable.
- - - - -
1b644d20 by Bas Couwenberg at 2022-07-28T09:01:14+02:00
Mark pybuild.patch as Applied-Upstream.
- - - - -
207c726f by Bas Couwenberg at 2022-07-28T09:56:13+02:00
New upstream version 3.4.1
- - - - -
edebcd70 by Bas Couwenberg at 2022-07-28T09:56:16+02:00
Update upstream source from tag 'upstream/3.4.1'
Update to upstream version '3.4.1'
with Debian dir 1af53bc4d8f724add11c269417bc79a6b904cc47
- - - - -
7c7be996 by Bas Couwenberg at 2022-07-28T09:56:33+02:00
New upstream release.
- - - - -
ba7df7c9 by Bas Couwenberg at 2022-07-28T09:57:16+02:00
Drop pybuild.patch, applied upstream.
- - - - -
d5f5d2f2 by Bas Couwenberg at 2022-07-28T09:58:53+02:00
Set distribution to unstable.
- - - - -
d8e8e365 by Bas Couwenberg at 2022-08-02T06:52:55+02:00
Merge tag 'debian/3.4.1-1' into bullseye-backports
releasing package pyosmium version 3.4.1-1
- - - - -
a766f912 by Bas Couwenberg at 2022-08-02T06:53:02+02:00
Rebuild for bullseye-backports.
- - - - -
12 changed files:
- .github/workflows/ci.yml
- CHANGELOG.md
- README.md
- debian/changelog
- debian/control
- debian/rules
- doc/conf.py
- lib/simple_writer.cc
- setup.py
- src/osmium/version.py
- test/conftest.py
- test/test_writer.py
Changes:
=====================================
.github/workflows/ci.yml
=====================================
@@ -12,17 +12,6 @@ jobs:
- name: Install packages
run: sudo apt-get install -y -qq libboost-dev libexpat1-dev zlib1g-dev libbz2-dev libproj-dev libgeos-dev liblz4-dev
- - name: Set up Python 3.5
- uses: actions/setup-python at v2
- with:
- python-version: 3.5
-
- - name: Build package 3.5
- run: |
- pip install build wheel
- python -m build
- shell: bash
-
- name: Set up Python 3.6
uses: actions/setup-python at v2
with:
@@ -91,7 +80,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10"]
+ python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout at v2
@@ -126,13 +115,13 @@ jobs:
cc: gcc-7
cxx: g++-7
platform: ubuntu-18.04
- python: 3.5
+ python: 3.6
deps: release
- compiler: clang-old
cc: clang-6.0
cxx: clang++-6.0
platform: ubuntu-18.04
- python: 3.5
+ python: 3.6
deps: release
- compiler: gcc
cc: gcc-10
@@ -217,19 +206,6 @@ jobs:
run: vcpkg install bzip2:x64-windows expat:x64-windows zlib:x64-windows boost-variant:x64-windows boost-iterator:x64-windows lz4:x86-windows
shell: bash
- - name: Set up Python 3.5
- uses: actions/setup-python at v2
- with:
- python-version: 3.5
-
- - name: Build package 3.5
- run: |
- pip install build wheel
- python -m build
- shell: bash
- env:
- CMAKE_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
-
- name: Set up Python 3.6
uses: actions/setup-python at v2
with:
@@ -308,10 +284,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
- include:
- - python-version: "3.10"
- test-args: "-k 'not test_amenity_list'" #no binary wheel for shapely available
+ python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
env:
PYTEST_ADDOPTS: ${{ matrix.test-args }}
=====================================
CHANGELOG.md
=====================================
@@ -4,6 +4,26 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
+## [3.4.1] - 2022-07-28
+
+### Fixed
+
+- allow building docs from built sources in PYTHONPATH again
+
+
+## [3.4.0] - 2022-07-27
+
+### Fixed
+
+- finding the build directory when newer versions of setuptools are used
+
+### Changed
+
+- improve error message when writing to a writer that is already closed
+- update to pybind 2.10.0
+- drop support for Python 3.5
+
+
## [3.3.0] - 2022-03-22
### Added
=====================================
README.md
=====================================
@@ -8,7 +8,7 @@ manner.
## Installation
-Pyosmium works with Python >= 3.5. Pypy is known to not work.
+Pyosmium works with Python >= 3.6. Pypy is known to not work.
### Using Pip
=====================================
debian/changelog
=====================================
@@ -1,3 +1,24 @@
+pyosmium (3.4.1-1~bpo11+1) bullseye-backports; urgency=medium
+
+ * Rebuild for bullseye-backports.
+
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 02 Aug 2022 06:52:58 +0200
+
+pyosmium (3.4.1-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Drop pybuild.patch, applied upstream.
+
+ -- Bas Couwenberg <sebastic at debian.org> Thu, 28 Jul 2022 09:58:44 +0200
+
+pyosmium (3.4.0-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Bump Standards-Version to 4.6.1, no changes.
+ * Add patch to fix doc build.
+
+ -- Bas Couwenberg <sebastic at debian.org> Thu, 28 Jul 2022 05:33:45 +0200
+
pyosmium (3.3.0-2~bpo11+1) bullseye-backports; urgency=medium
* Rebuild for bullseye-backports.
=====================================
debian/control
=====================================
@@ -18,7 +18,7 @@ Build-Depends: cmake (>= 2.8.12),
python3-shapely <!nocheck>,
python3-sphinx,
python3-sphinxcontrib.autoprogram
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
Vcs-Browser: https://salsa.debian.org/debian-gis-team/pyosmium/
Vcs-Git: https://salsa.debian.org/debian-gis-team/pyosmium.git -b bullseye-backports
Homepage: https://osmcode.org/pyosmium/
=====================================
debian/rules
=====================================
@@ -28,8 +28,8 @@ override_dh_clean:
override_dh_auto_build-indep:
dh_auto_build --indep
- (cd doc && PYTHONPATH=$(CURDIR)/.pybuild/cpython3_`py3versions -vd`_pyosmium/build make html)
- (cd doc && PYTHONPATH=$(CURDIR)/.pybuild/cpython3_`py3versions -vd`_pyosmium/build make man)
+ (cd doc && make html)
+ (cd doc && make man)
override_dh_auto_install:
PYBUILD_INSTALL_ARGS="--install-scripts=/usr/lib/{package}" dh_auto_install
=====================================
doc/conf.py
=====================================
@@ -20,24 +20,33 @@ import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-build_dir = "../build/lib.%s-%d.%d" % (
- sysconfig.get_platform(),
- sys.version_info[0], sys.version_info[1])
+# old style distutils libraries
+build_dir = "../build/lib.%s-%d.%d" % (sysconfig.get_platform(),
+ sys.version_info[0], sys.version_info[1])
+if not os.path.exists(build_dir):
+ # new style distutils libraries
+ build_dir = "../build/lib.%s-%s" % (sysconfig.get_platform(),
+ sys.implementation.cache_tag)
+ if not os.path.exists(build_dir):
+ # pybuild
+ build_dir = "../.pybuild/cpython3_%s.%s_pyosmium/build" % (
+ sys.version_info[0], sys.version_info[1]
+ )
+
+if os.path.exists(build_dir):
+ sys.path.insert(0, os.path.normpath(os.path.join(os.path.abspath('.'), build_dir)))
# insert after the current directory
-sys.path.insert(0, os.path.normpath(os.path.join(os.path.abspath('.'), build_dir)))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.abspath('.'), '../tools')))
try:
from osmium.version import pyosmium_major, pyosmium_release
except ImportError:
print("""
- Compiled version of pyosmium not found, please build pyosmium
- for Python %d.%d.
- Expected build directory: %s """
- % (sys.version_info[0], sys.version_info[1], build_dir))
- raise
+ Compiled version of pyosmium not found, please build pyosmium for Python {}.{}
+ before building the documentation.
+ """.format(*sys.version_info))
+ raise RuntimeError("Cannot find pyosmium")
# -- General configuration ------------------------------------------------
=====================================
lib/simple_writer.cc
=====================================
@@ -36,6 +36,10 @@ public:
void add_node(py::object o)
{
+ if (!buffer) {
+ throw std::runtime_error{"Writer already closed."};
+ }
+
if (py::isinstance<osmium::Node>(o)) {
buffer.add_item(o.cast<osmium::Node &>());
} else {
@@ -57,6 +61,10 @@ public:
void add_way(py::object o)
{
+ if (!buffer) {
+ throw std::runtime_error{"Writer already closed."};
+ }
+
if (py::isinstance<osmium::Way>(o)) {
buffer.add_item(o.cast<osmium::Way &>());
} else {
@@ -76,6 +84,10 @@ public:
void add_relation(py::object o)
{
+ if (!buffer) {
+ throw std::runtime_error{"Writer already closed."};
+ }
+
if (py::isinstance<osmium::Relation>(o)) {
buffer.add_item(o.cast<osmium::Relation &>());
} else {
=====================================
setup.py
=====================================
@@ -131,8 +131,8 @@ class CMakeBuild(build_ext):
versions = get_versions()
-if sys.version_info < (3,5):
- raise RuntimeError("Python 3.5 or larger required.")
+if sys.version_info < (3,6):
+ raise RuntimeError("Python 3.6 or larger required.")
with open('README.rst', 'r') as descfile:
long_description = descfile.read()
@@ -155,7 +155,6 @@ setup(
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
- "Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
@@ -167,7 +166,7 @@ setup(
ext_modules=[CMakeExtension('cmake_example')],
packages = ['osmium', 'osmium/osm', 'osmium/replication'],
package_dir = {'' : 'src'},
- python_requires = ">=3.5",
+ python_requires = ">=3.6",
install_requires = ['requests'],
cmdclass=dict(build_ext=CMakeBuild, sdist=Pyosmium_sdist),
zip_safe=False,
=====================================
src/osmium/version.py
=====================================
@@ -3,13 +3,13 @@ Version information.
"""
# the major version
-pyosmium_major = '3.3'
+pyosmium_major = '3.4'
# current release (Pip version)
-pyosmium_release = '3.3.0'
+pyosmium_release = '3.4.1'
# libosmium version shipped with the Pip release
libosmium_version = '2.18.0'
# protozero version shipped with the Pip release
protozero_version = '1.7.1'
# pybind11 version shipped with the Pip release
-pybind11_version = '2.9.1'
+pybind11_version = '2.10.0'
=====================================
test/conftest.py
=====================================
@@ -11,12 +11,16 @@ import uuid
from textwrap import dedent
SRC_DIR = (Path(__file__) / '..' / '..').resolve()
+
BUILD_DIR = "build/lib.{}-{}.{}".format(sysconfig.get_platform(),
sys.version_info[0], sys.version_info[1])
+if not (SRC_DIR / BUILD_DIR).exists():
+ BUILD_DIR = "build/lib.{}-{}".format(sysconfig.get_platform(),
+ sys.implementation.cache_tag)
-# always test against the source
-sys.path.insert(0, str(SRC_DIR))
-sys.path.insert(0, str(SRC_DIR / BUILD_DIR))
+if (SRC_DIR / BUILD_DIR).exists():
+ sys.path.insert(0, str(SRC_DIR))
+ sys.path.insert(0, str(SRC_DIR / BUILD_DIR))
import pytest
=====================================
test/test_writer.py
=====================================
@@ -214,3 +214,35 @@ def test_set_custom_header(tmp_path):
assert h.box().top_right == o.osm.Location(10, 45)
finally:
rd.close()
+
+
+def test_add_node_after_close(tmp_path, simple_handler):
+ node_opl = "n235 v1 dV c0 t i0 u Telephant=yes x98.7 y-3.45"
+
+ filename = tmp_path / (str(uuid.uuid4()) + '.opl')
+ writer = o.SimpleWriter(str(filename), 1024*1024)
+ writer.close()
+
+ with pytest.raises(RuntimeError, match='closed'):
+ simple_handler(node_opl, node=lambda o: writer.add_node(o))
+
+
+def test_add_way_after_close(tmp_path, simple_handler):
+ node_opl = "w1 Nn1"
+
+ filename = tmp_path / (str(uuid.uuid4()) + '.opl')
+ writer = o.SimpleWriter(str(filename), 1024*1024)
+ writer.close()
+
+ with pytest.raises(RuntimeError, match='closed'):
+ simple_handler(node_opl, way=lambda o: writer.add_way(o))
+
+def test_add_relation_after_close(tmp_path, simple_handler):
+ node_opl = "r54 Mn1@,w3 at foo"
+
+ filename = tmp_path / (str(uuid.uuid4()) + '.opl')
+ writer = o.SimpleWriter(str(filename), 1024*1024)
+ writer.close()
+
+ with pytest.raises(RuntimeError, match='closed'):
+ simple_handler(node_opl, relation=lambda o: writer.add_relation(o))
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyosmium/-/compare/298a50e37f49ea24eddeb5c250ca7774d232cdd3...a766f912b5d3ad23e0726e0c827f01142bc68c99
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyosmium/-/compare/298a50e37f49ea24eddeb5c250ca7774d232cdd3...a766f912b5d3ad23e0726e0c827f01142bc68c99
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/20220802/0bb05d41/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list