pyvalhalla-git 3.5.1.post193__cp311-cp311-macosx_14_0_arm64.whl → 3.6.0.post0__cp311-cp311-macosx_14_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyvalhalla-git
3
- Version: 3.5.1.post193
3
+ Version: 3.6.0.post0
4
4
  Summary: High-level bindings to the Valhalla C++ library
5
5
  Home-page: https://github.com/valhalla/valhalla
6
6
  Author: Nils Nolde
@@ -36,10 +36,6 @@ This folder contains the Python bindings to [Valhalla routing engine](https://gi
36
36
 
37
37
  On top of the (very) high-level Python bindings, we package some data-building Valhalla executables to ease the process of graph creation.
38
38
 
39
- ### License
40
-
41
- Due to the dependencies we package, the Python bindings are licensed under GNU Lesser General Public License v2 or later (LGPLv2+).
42
-
43
39
  ### Installation
44
40
 
45
41
  We distribute all currently maintained CPython versions as **binary wheels** for Win64, MacOS (`arm64`) and Linux (`x86_64`) distributions with `glibc>=2.28`. We **do not** offer a source distribution on PyPI.
@@ -51,7 +47,7 @@ We distribute all currently maintained CPython versions as **binary wheels** for
51
47
 
52
48
  #### Bindings
53
49
 
54
- Find a more extended notebook in `./examples`, e.g. how to [use the actor](./examples/actor_examples.ipynb).
50
+ Find a more extended notebook in `./examples`, e.g. how to [use the actor](https://github.com/valhalla/valhalla/blob/master/src/bindings/python/examples/actor_examples.ipynb).
55
51
 
56
52
  Before using the Python bindings you need to have access to a routable Valhalla graph. Either install Valhalla from source and built the graph from OSM compatible data or use our [Valhalla docker image](https://github.com/gis-ops/docker-valhalla) for a painless experience, e.g. this will build the routing graph for Andorra in `./custom_files`:
57
53
 
@@ -75,7 +71,7 @@ actor = Actor(config)
75
71
  route = actor.route({"locations": [...]})
76
72
  ```
77
73
 
78
- #### Valhalla executables
74
+ #### Valhalla executables (**`linux-x86_x64` only**)
79
75
 
80
76
  To access the C++ (native) executables, there are 2 options:
81
77
  - (recommended) execute the module, e.g. `python -m valhalla valhalla_build_tiles -h`
@@ -126,11 +122,16 @@ This will also build & install `libvalhalla` before building the bindings. At th
126
122
  On our CI, this orchestrates the packaging of all `pyvalhalla` wheels for every supported, minor Python version and every platform. It can also be run locally (obviously only being able to build wheels for _your_ platform), e.g.
127
123
 
128
124
  ```shell
129
- # specifiers from https://cibuildwheel.pypa.io/en/stable/options/#build-skip
125
+ python -m pip install cibuildwheel
126
+ cibuildwheel --print-build-identifiers
130
127
  cibuildwheel --only cp313-manylinux_x86_64
131
128
 
132
129
  # for windows you'll have to set an env var to the vcpkg win root
133
130
  VCPKG_ARCH_ROOT="build/vcpkg_installed/custom-x64-windows" cibuildwheel --only cp313-manylinux_x86_64
134
131
  ```
135
132
 
136
- On Linux, this might download the `manylinux` docker image. In the end, you'll find the wheel in `./wheelhouse`.
133
+ On Linux, this might download the [`manylinux` docker image](https://github.com/valhalla/manylinux/pkgs/container/manylinux). In the end, you'll find the wheel in `./wheelhouse`.
134
+
135
+ ### Testing (**`linux-x86_x64` only**)
136
+
137
+ We have a small [test script](https://github.com/valhalla/valhalla/blob/master/src/bindings/python/test/test_pyvalhalla_package.sh) which makes sure that all the executables are working properly. If run locally for some reason, install a `pyvalhalla` wheel first. We run this in CI in a fresh Docker container with no dependencies installed, mostly to verify dynamic linking of the vendored dependencies.
@@ -1,20 +1,20 @@
1
1
  _valhalla.cpython-311-darwin.so,sha256=G6uefdkhtibfTw88P2RrKWv43FJGjBK6bToQRSvnTWA,11478848
2
- pyvalhalla_git-3.5.1.post193.dist-info/RECORD,,
3
- pyvalhalla_git-3.5.1.post193.dist-info/WHEEL,sha256=IDSs5FX6_bA_Je6GNgVyz6rcn2XC7t_ySnnLoSan-5o,136
4
- pyvalhalla_git-3.5.1.post193.dist-info/top_level.txt,sha256=mU472JpF5fOfpVQ8UxZ_dwLmecLogajAMO5RmYsU1gw,19
5
- pyvalhalla_git-3.5.1.post193.dist-info/METADATA,sha256=yE_nUq5JEu1Gdl7hI9obCXKTop4bRF0UoIMwrtDaK7U,6335
6
- pyvalhalla_git-3.5.1.post193.dist-info/licenses/LICENSE.md,sha256=sZlxfQFAuJ8ba_1E8G3hYQ7eC770tBIywEWAg3rrixM,44
7
- pyvalhalla_git-3.5.1.post193.dist-info/licenses/AUTHORS,sha256=IGm6Dg1NRkmFHV2GWvlPdfiqVoc1kfoc0pMbcKiCs30,171
8
- pyvalhalla_git-3.5.1.post193.dist-info/licenses/COPYING,sha256=i9sUrrsAX_p17jiQqhCyQrMMhAyqAbmWxWM4yiefN80,1135
2
+ pyvalhalla_git-3.6.0.post0.dist-info/RECORD,,
3
+ pyvalhalla_git-3.6.0.post0.dist-info/WHEEL,sha256=IDSs5FX6_bA_Je6GNgVyz6rcn2XC7t_ySnnLoSan-5o,136
4
+ pyvalhalla_git-3.6.0.post0.dist-info/top_level.txt,sha256=mU472JpF5fOfpVQ8UxZ_dwLmecLogajAMO5RmYsU1gw,19
5
+ pyvalhalla_git-3.6.0.post0.dist-info/METADATA,sha256=uzpMMvlVTOF183ebKJqt4o2qAYAGemUQg52C1UR2LNI,6790
6
+ pyvalhalla_git-3.6.0.post0.dist-info/licenses/LICENSE.md,sha256=sZlxfQFAuJ8ba_1E8G3hYQ7eC770tBIywEWAg3rrixM,44
7
+ pyvalhalla_git-3.6.0.post0.dist-info/licenses/AUTHORS,sha256=IGm6Dg1NRkmFHV2GWvlPdfiqVoc1kfoc0pMbcKiCs30,171
8
+ pyvalhalla_git-3.6.0.post0.dist-info/licenses/COPYING,sha256=i9sUrrsAX_p17jiQqhCyQrMMhAyqAbmWxWM4yiefN80,1135
9
9
  valhalla/config.py,sha256=kpYm-7RS4Mz3plcfGWNDx1s6tfXjnBGMei1uxhQ7VJM,1488
10
10
  valhalla/_valhalla.cc,sha256=3OorCxyOun1-Q9olHlHw75q3XlprX4Lgd4UKQSHahsY,3699
11
- valhalla/__init__.py,sha256=hkaH-hN0yQ4NLDcAD-d5Jm1Qne6rc7HcDJimDZ92-B8,269
12
- valhalla/__version__.py,sha256=Ayqd5H42DgZ_KBT7ApCl3-fCyWjKpNYrTUjrUdD0Qz4,530
11
+ valhalla/__init__.py,sha256=jxEX6PBKomyDW1D0On57Y52MIzBmmRQ8gnKb04p8tWg,374
12
+ valhalla/__version__.py,sha256=3CR9tHm_p_sRxPJJWnncp-FiRECKyV5HyHanX3vMSMY,526
13
13
  valhalla/utils.py,sha256=VCxJ5rNX4Ha8Ey4T81y1b3Ke2svUwGn5TNyW8nC_8p8,1923
14
14
  valhalla/actor.py,sha256=MviJjb6ui1KwIzJbACHncuLNDdHkj1hyzCHlDD_yEjw,4077
15
15
  valhalla/_scripts.py,sha256=-zpCo07ckNy9yQFs2BymmmYwKS94ZAhlRyHLPUsfEKg,1504
16
16
  valhalla/valhalla_build_config.py,sha256=WJJG6t6I8NnkGc_Wd4vSwI2mgZcwQqPrwvKph2AjfGc,42507
17
- valhalla/__main__.py,sha256=X6B0ffW0-hWWJ-ZowzWnK9tFCF1himT3eQkTWyJ_xL0,2273
17
+ valhalla/__main__.py,sha256=2X-2Wd8BOXKG63pI8M-nA2nMya2eJGU16aFK3ye0UMQ,2069
18
18
  valhalla/.dylibs/libsnappy.1.2.2.dylib,sha256=1D_MdNjNSmrGYQG30ZlmqXb2H1xTbacCevELbUEtRk0,79184
19
19
  valhalla/.dylibs/libhwy.1.2.0.dylib,sha256=Yrg_gB_yAOrT3Y494y1ePdkxz4-uSWDcin5WVWEmba4,96928
20
20
  valhalla/.dylibs/libIlmThread-3_3.32.3.3.3.dylib,sha256=Cbc2qNJa6hSvnHc_LWttt6wsd3ZgyI6CoCEd3yUlkXs,69744
@@ -89,7 +89,7 @@ valhalla/.dylibs/libssl.3.dylib,sha256=XbtHxY-Fp8FxFknYWDnlyKjSTUI44tPzH07xVDIzF
89
89
  valhalla/.dylibs/libabsl_log_internal_format.2407.0.0.dylib,sha256=1KEcZ4z8p2nlMUztcWAaZMEpQC1VDa3-Phv9cixj4Js,72112
90
90
  valhalla/.dylibs/libabsl_log_sink.2407.0.0.dylib,sha256=wmmSP56bkIXGQSKmKvqhXgp19sXigY12wt8boXNwxSU,68624
91
91
  valhalla/.dylibs/libarrow_dataset.2000.0.0.dylib,sha256=dIUWH4uFDQA5lC5-TLx_UyE6oF2HYWWV3hH9FVJ82dM,2432768
92
- valhalla/.dylibs/libprime_server.0.dylib,sha256=h_ScEhTzdwdHHS5UCpDq60I9j423In1XM84PM_MwIjY,393168
92
+ valhalla/.dylibs/libprime_server.0.dylib,sha256=US-Ens9ctYyEqCRrDC9BdptthSkGj53XEQfNeZxAjMo,393168
93
93
  valhalla/.dylibs/libabsl_strerror.2407.0.0.dylib,sha256=p_NTirDupMktySlY_NFWEw-9vf3Q_mnDwvD2zO2uugI,53872
94
94
  valhalla/.dylibs/libnetcdf.22.dylib,sha256=B2gbziNwPMxNBjwrhgkAwpJeo76uXpxSGzHSWE9h1zc,1309456
95
95
  valhalla/.dylibs/libabsl_time.2407.0.0.dylib,sha256=4jzEGP5uO8FeGeMnPpxPiX2oDl_eiknqIDWaB93ENDU,111456
Binary file
valhalla/__init__.py CHANGED
@@ -6,6 +6,11 @@ except ModuleNotFoundError:
6
6
  from _valhalla import *
7
7
  from .actor import Actor
8
8
  from .config import get_config, get_help
9
- from .__version__ import __version__
9
+
10
+ # if run from CMake, Docker or tests
11
+ try:
12
+ from .__version__ import __version__
13
+ except ModuleNotFoundError:
14
+ __version__ = "undefined"
10
15
 
11
16
  PYVALHALLA_DIR = Path(__file__).parent.resolve()
valhalla/__main__.py CHANGED
@@ -3,30 +3,31 @@ import sys
3
3
  from typing import Optional
4
4
 
5
5
  from ._scripts import PYVALHALLA_BIN_DIR, run
6
+ from . import __version__
6
7
 
7
8
  PRINT_BIN_PATH = "print_bin_path"
8
9
 
9
10
 
10
11
  def print_help():
11
- print(
12
- "\npyvalhalla package provides a CLI to run Valhalla C++ executables. Arguments are simply passed on as they are."
13
- )
14
- print(
15
- "One notable exception is --quiet/-q, which will forward the C++ executable's stdout to /dev/null."
16
- )
17
- print("'python -m valhalla --help' will print this help.")
18
- print(
19
- "\nExample usage: 'python -m valhalla --quiet valhalla_build_tiles -c valhalla.json -s initialize -e build test.pbf'"
20
- )
21
- print("\nAvailable commands:")
22
12
  # left-align executable names
23
13
  exe_names = [p.name for p in PYVALHALLA_BIN_DIR.iterdir()]
24
14
  fixed_width = len(max(exe_names, key=lambda x: len(x)))
15
+
16
+ # TODO: we also want the git commit to show here, probably written to __version__.py by setup.py's BDistWheelCommand
25
17
  print(
26
- f"\t{PRINT_BIN_PATH:<{fixed_width}} - Print the absolute path of directory containing the C++ executables"
18
+ F"""
19
+ valhalla Python package {__version__}
20
+
21
+ pyvalhalla package provides a CLI to run Valhalla C++ executables. Arguments are simply passed on as they are.
22
+ One notable exception is --quiet/-q, which will forward the C++ executable's stdout to /dev/null.
23
+ 'python -m valhalla --help' will print this help.
24
+
25
+ Example usage: 'python -m valhalla --quiet valhalla_build_tiles -c valhalla.json -s initialize -e build test.pbf'
26
+
27
+ Available commands (in {PYVALHALLA_BIN_DIR}):
28
+ \t{PRINT_BIN_PATH:<{fixed_width}} - Print the absolute path of directory containing the C++ executables
29
+ """
27
30
  )
28
- for command in exe_names:
29
- print(f"\t{command:<{fixed_width}} - see usage with 'python -m pyvalhalla {command} --help' ")
30
31
 
31
32
 
32
33
  def main():
@@ -42,8 +43,6 @@ def main():
42
43
  sys.exit(0)
43
44
  elif prog_or_opt == PRINT_BIN_PATH:
44
45
  # useful when another script wants to run the executables directly for some reason
45
- # in theory one doesn't even need a python installation for the Valhalla executables
46
- # to still work, provided the correct wheel is used for the specific platform
47
46
  print(PYVALHALLA_BIN_DIR)
48
47
  else:
49
48
  exc: Optional[Exception] = None
valhalla/__version__.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '3.5.1.post193'
21
- __version_tuple__ = version_tuple = (3, 5, 1, 'post193')
20
+ __version__ = version = '3.6.0.post0'
21
+ __version_tuple__ = version_tuple = (3, 6, 0, 'post0')