westonpace commented on issue #19046:
URL: https://github.com/apache/arrow/issues/19046#issuecomment-1540473052

   > Is there a way to build and test a CPython version?
   
   I'm not entirely sure I understand.
   
   Arrow is built today with cython (and both Arrow and cython use CPython).  
The instructions on how to build and test are 
[here](https://arrow.apache.org/docs/developers/python.html).
   
   The ask here is (I think) to use Arrow-C++ in a PyPy project and then have 
that project speak with pyarrow.  However, since this issue has been filed, we 
have come a lot further on the C data API, which is generally a better way to 
solve this problem.
   
   ```mermaid
   flowchart TD
       A[Python Interpreter] --> B
       A --> C
       B[pymylib] -->|pybind11| E
       C[pyarrow] -->|cython| D
       D[Arrow-C++]
       E[MyC++Lib] --> F
       F[Arrow-C++]
   ```
   
   In the above case, to move data from `MyC++Lib` to `pyarrow` you should 
export the data using the C data interface (since you're using `Arrow-C++` you 
can use `arrow::ExportArray` in `bridge.h`.  Then you can pass that pointer 
along to pyarrow and call `pyarrow.Array._import_from_c` to get a pyarrow Arrow.
   
   Since the above should work pretty well, there is not much motivation to try 
and integrate Arrow-C++ into pybind11 directly.


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