forked from nilsnolde/py-osrm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
executable file
·76 lines (67 loc) · 2.38 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[build-system]
requires = ["scikit-build-core >=0.4.3", "nanobind >=1.3.1"]
build-backend = "scikit_build_core.build"
[project]
name = "osrm-bindings"
version = "0.0.1"
description = "Python bindings for the osrm-backend project"
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
[project.urls]
repository = "https://github.com/gis-ops/py-osrm"
"osrm-backend repository" = "https://github.com/Project-OSRM/osrm-backend"
[tool.scikit-build]
minimum-version = "0.4"
build-dir = "build/{wheel_tag}"
wheel.py-api = "cp312"
wheel.packages = ["src/osrm", "src/bin"]
[tool.cibuildwheel]
archs = ["native"]
build = "cp*"
build-verbosity = 1
skip = "*musllinux*"
manylinux-x86_64-image = "ghcr.io/gis-ops/manylinux:2_28_osrm_python"
test-requires = "pytest"
test-command = [
"cd {project}/tests/data",
"make",
"python -m osrm datastore {project}/tests/data/ch/monaco",
"pytest {project}/tests"
]
[tool.cibuildwheel.linux]
environment = "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/intel64/gcc4.8/"
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
[tool.cibuildwheel.macos]
environment = "MACOSX_DEPLOYMENT_TARGET=10.14"
before-all = """
mkdir osrm-backend
tar -zxf osrm-backend.tgz -C osrm-backend
cd osrm-backend
cp -r include /usr/local
cp -r third_party/flatbuffers/include /usr/local
cp -r third_party/variant/include /usr/local
cp -r profiles /usr/local/share/osrm/
cd build
cp *.a /usr/local/lib
cp osrm-* /usr/local/bin
cp libosrm.pc /usr/local/lib/pkgconfig
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
brew install lua tbb boost@1.76
brew link boost@1.76
"""
[tool.cibuildwheel.windows]
before-all = [
"tar -zxf osrm-backend.tgz",
"((robocopy /E /IS /NFL /NDL /NJH /NJS /NP /MOVE .conan C:\\.conan) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0)",
"((robocopy /E /IS /NFL /NDL /NJH /NJS /NP /MOVE Users C:\\Users) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0)",
"MKDIR C:\\OSRM",
"((robocopy /E /IS /NFL /NDL /NJH /NJS /NP /MOVE OSRM C:\\OSRM) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0)",
"((robocopy /E /IS /NFL /NDL /NJH /NJS /NP /MOVE C:\\OSRM\\lib\\pkgconfig C:\\Strawberry\\c\\lib\\pkgconfig) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0)"
]
test-command = [
"cd /d {project}/tests/data",
"windows-build-tests.bat",
"python -m osrm datastore {project}/tests/data/ch/monaco",
"pytest {project}/tests"
]