vanshaj2023 commented on issue #49273:
URL: https://github.com/apache/arrow/issues/49273#issuecomment-3905085435

   Hi @rok, thanks for the feedback on this. After studying the build pipeline, 
I'd like to propose a long-term approach:
   
   **Create a `pyarrow/_build_utils/` subpackage + graceful degradation:**
   
   1. Move `scripts/update_stub_docstrings.py` → 
`pyarrow/_build_utils/update_stub_docstrings.py`
   2. Replace the `importlib.util.spec_from_file_location` dynamic import in 
`setup.py` with a normal `from pyarrow._build_utils import ...` wrapped in 
`try/except`
   3. Exclude `_build_utils` from wheels via 
`tool.setuptools.packages.find.exclude`
   4. Remove the explicit `MANIFEST.in` line — `graft pyarrow` already covers it
   5. Make `libcst` a soft build dependency so builds degrade gracefully 
without it (stubs still get copied, just without docstrings)
   
   **Benefits:**
   
   - Eliminates the fragile dynamic import hack
   - Script auto-included in sdist, never in wheels
   - Builds on exotic platforms (BSD, NixOS, s390x) work without `libcst`
   - `_build_utils/` is extensible for future build-only utilities
   - CI wheels still get full docstrings (CI installs `libcst`)
   
   Does this direction align with what you had in mind, or would you prefer a 
different approach?


-- 
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]

Reply via email to