Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Meson again #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions CMakeLists.txt

This file was deleted.

6 changes: 2 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ project(
)

py = import('python').find_installation()
nanoarrow_dep = dependency(
'nanoarrow',
)
nanobind_dep = dependency('nanobind')
nanoarrow_dep = dependency('nanoarrow', static: true)
nanobind_dep = dependency('nanobind', static: true)

py.extension_module(
'capsule_bug',
Expand Down
27 changes: 12 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[build-system]
requires = [
"scikit-build-core",
"nanobind",
'meson-python',
'meson',
'cmake', # for nanobind
'wheel',
]
build-backend = "scikit_build_core.build"

build-backend= 'mesonpy'

[project]
name = 'capsule_bug'
Expand Down Expand Up @@ -36,19 +39,13 @@ skip = "*musllinux*"
test-command = "python -m pytest {project}/tests"
test-requires = ["pytest", "pyarrow"]

[tool.cibuildwheel.linux]
repair-wheel-command = """
auditwheel repair -w {dest_dir} {wheel}
"""
build-frontend = "pip; args: -v"
config-settings = 'compile-args="-v"'

[tool.cibuildwheel.macos]
# we do not want delocate to relocate the tableauhyperapi.lib as our CMake
# config already handles that, and the tableauhyperapi.lib necessicates
# the hyper bin being relative to it, which delocate does not know about
repair-wheel-command = """
delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
"""
[tool.meson-python.args]
compile = ['-v']
install = ['--skip-subprojects']

[tool.cibuildwheel.windows]
before-build = "python -m pip install delvewheel"
repair-wheel-command = "python -m delvewheel repair -v --add-path C:/Windows/System32 -w {dest_dir} {wheel}"
repair-wheel-command = "python -m delvewheel repair -v --add-path C:/Windows/System32 -w {dest_dir} {wheel}"
8 changes: 8 additions & 0 deletions subprojects/nanoarrow.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[wrap-file]
directory = arrow-nanoarrow-793590e45abfefa93f9fd1447b4b5d98266ccfca
source_url = https://github.com/apache/arrow-nanoarrow/archive/793590e45abfefa93f9fd1447b4b5d98266ccfca.tar.gz
source_filename = apache-arrow-nanoarrow-793590e45abfefa93f9fd1447b4b5d98266ccfca.tar.gz
source_hash = fdb238ae7b2ce24d0bbbbf795d0b2babc4c0c0eb0b3ce158c9fe7d109c00e67a

[provide]
nanoarrow = nanoarrow_dep
13 changes: 13 additions & 0 deletions subprojects/nanobind.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[wrap-file]
directory = nanobind-2.1.0
source_url = https://github.com/wjakob/nanobind/archive/refs/tags/v2.1.0.tar.gz
source_filename = nanobind-2.1.0.tar.gz
source_hash = c37c53c60ada5fe1c956e24bd4b83af669a2309bf952bd251f36a7d2fa3bacf0
patch_filename = nanobind_2.1.0-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/nanobind_2.1.0-1/get_patch
patch_hash = 79f6511b10627e75067efb883765d7b8865633185cd22db733c8816239b8dd6c
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/nanobind_2.1.0-1/nanobind-2.1.0.tar.gz
wrapdb_version = 2.1.0-1

[provide]
nanobind = nanobind_dep
13 changes: 13 additions & 0 deletions subprojects/robin-map.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[wrap-file]
directory = robin-map-1.3.0
source_url = https://github.com/Tessil/robin-map/archive/refs/tags/v1.3.0.tar.gz
source_filename = robin-map-1.3.0.tar.gz
source_hash = a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236
patch_filename = robin-map_1.3.0-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/robin-map_1.3.0-1/get_patch
patch_hash = 6d090f988541ffb053512607e0942cbd0dbc2a4fa0563e44ff6a37e810b8c739
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/robin-map_1.3.0-1/robin-map-1.3.0.tar.gz
wrapdb_version = 1.3.0-1

[provide]
robin-map = robin_map_dep
2 changes: 1 addition & 1 deletion tests/test_bug.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pyarrow as pa

from capsule_bug import capsule_bug
import capsule_bug

def test_bug():
schema = pa.schema([("col", pa.decimal128(38, 10))])
Expand Down
Loading