Skip to content

Commit

Permalink
Include subproject in dist
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Oct 15, 2024
1 parent 8f3fb2b commit 105ca94
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 46 deletions.
13 changes: 1 addition & 12 deletions python/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,7 @@ def _write_defs(self, output):
def copy_or_generate_nanoarrow_c():
this_dir = pathlib.Path(__file__).parent.resolve()
subproj_dir = this_dir / "subprojects"

# prefer a symlinked directory if it exists
if (subproj_dir / "arrow-nanoarrow-dev").exists():
source_dir = subproj_dir / "arrow-nanoarrow-dev"
else: # fall back to wrap-downloaded project
arrow_dirs = list(subproj_dir.glob("arrow-nanoarrow-*/"))
if (num_dir := len(arrow_dirs)) != 1:
raise ValueError(
"Expected to find 1 wrap download for arrow-nanoarrow subproject, "
f"found: {num_dir}"
)
source_dir = arrow_dirs[0]
source_dir = subproj_dir / "arrow-nanoarrow"

vendor_dir = this_dir / "vendor"

Expand Down
2 changes: 0 additions & 2 deletions python/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ project(
# https://github.com/mesonbuild/meson/issues/13746#issuecomment-2392510954
# We also need to set these options at the project default_option level
# due to https://github.com/mesonbuild/meson/issues/6728
'arrow-nanoarrow-dev:ipc=true',
'arrow-nanoarrow-dev:device=true',
'arrow-nanoarrow:ipc=true',
'arrow-nanoarrow:device=true',
],
Expand Down
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ build-backend = "mesonpy"

[tool.meson-python.args]
install = ['--skip-subprojects']
dist = ['--include-subprojects']
6 changes: 1 addition & 5 deletions python/src/nanoarrow/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
# to the wrap entry if that is unsuccessful. Ideally Meson would
# take care of this for us, but there is a bug upstream
# https://github.com/mesonbuild/meson/issues/13746#issuecomment-2392510954
nanoarrow_proj = subproject('arrow-nanoarrow-dev', required: false)
if not nanoarrow_proj.found()
nanoarrow_proj = subproject('arrow-nanoarrow')
endif

nanoarrow_proj = subproject('arrow-nanoarrow')
nanoarrow_dep = nanoarrow_proj.get_variable('nanoarrow_dep')
nanoarrow_ipc_dep = nanoarrow_proj.get_variable('nanoarrow_ipc_dep')
nanoarrow_device_dep = nanoarrow_proj.get_variable('nanoarrow_device_dep')
Expand Down
1 change: 1 addition & 0 deletions python/subprojects/arrow-nanoarrow
27 changes: 0 additions & 27 deletions python/subprojects/arrow-nanoarrow.wrap

This file was deleted.

0 comments on commit 105ca94

Please sign in to comment.