vanshaj2023 opened a new pull request, #49357: URL: https://github.com/apache/arrow/pull/49357
### Rationale for this change Follow-up to #49235 and #49273. The `update_stub_docstrings.py` script was added to `MANIFEST.in` to fix nightly sdist builds, but it used a fragile `importlib.util.spec_from_file_location` pattern and forced `libcst` as a hard build dependency. This gives the script a proper home and makes builds more robust for users on exotic platforms who may not have `libcst`. ### What changes are included in this PR? - Move `scripts/update_stub_docstrings.py` to `pyarrow/_build_utils/update_stub_docstrings.py` - `_build_utils` is auto-included in sdist via existing `graft pyarrow`, excluded from wheels via `setuptools.packages.find.exclude` - Replace `importlib.util.spec_from_file_location` in `setup.py` with a normal import wrapped in `try/except ImportError` - Make `libcst` a soft build dependency in `pyproject.toml` (CI still installs it via `requirements-build.txt`) - Add `PYARROW_SKIP_STUB_DOCSTRINGS` env var for explicit opt-out - Keep `scripts/update_stub_docstrings.py` as a thin CLI wrapper ### Are these changes tested? No new tests. Verified that all modified files pass flake8, graceful degradation catches ImportError cleanly, and CI requirements files still include `libcst` so official wheels get docstrings. ### Are there any user-facing changes? No. Users building from sdist without `libcst` will now get stubs without docstrings instead of a build failure. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
