### Rationale for this change
I noticed while editing a .pyx file that my changes weren't
showing up after a rebuild — I had to build twice. Traced it
to `BYPRODUCTS` being commented out in `UseCython.cmake`.
### What changes are included in this PR?
I uncommented `BYPRODUCTS ${_generated_files}` in
`cpp/cmake_modules/UseCython.cmake`. Without it, CMake doesn't
realize the .cpp was updated in the same build pass, so it
skips recompiling the .so until the next build.
The line was commented out for older CMake compatibility — but
the project requires CMake >= 3.25 now, and BYPRODUCTS has
worked since 3.2, so that's no longer a concern.
### Are these changes tested?
This is a build system fix so there's no unit test for it.
The CI builds pyarrow from source and runs the full test suite,
which will validate the build still works correctly.
### Are there any user-facing changes?
No — this only improves the dev experience when iterating on
.pyx files. One build instead of two.
* GitHub Issue: #50702
Authored-by: Pratyush Adhikari <pratyushadk990@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
### Rationale for this change
This is done by passing an extra flag when building the Cython extension modules. It is needed so that the GIL is not dynamically reenabled when importing `pyarrow.lib`.
### What changes are included in this PR?
Changes to CMake so that the extra flag is passed when building Cython extension modules.
* GitHub Issue: #43536
Lead-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
This also moves copying codes in setup.py to CMakeLists.txt. setup.py uses "cmake --build --target install" to put artifacts to suitable location.
Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
This PR fixes typos in files under `cpp` directory.
Closes#8520 from kiszk/ARROW-10384
Authored-by: Kazuaki Ishizaki <ishizaki@jp.ibm.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Use the new FindPython3 package if available.
Closes#6498 from pitrou/ARROW-7917-find-python3 and squashes the following commits:
f45b7f7db <Antoine Pitrou> Use distutils.sysconfig
dfc8201cf <Antoine Pitrou> Apply review comments
b3c01ebe1 <Antoine Pitrou> Ensure we use the first Python on PATH
7395f83af <Antoine Pitrou> ARROW-7917: Find Python 3 in CMake configuration
Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
After spending a non-trivial time wrestling with Cython and our build system, we're now able to generate and upload Python and Cython coverage results as part of a Travis-CI run (in addition to C++ coverage).
Author: Antoine Pitrou <antoine@python.org>
Closes#2050 from pitrou/ARROW-2574-cython-coverage and squashes the following commits:
4553185 <Antoine Pitrou> Remove leftover
b1212a4 <Antoine Pitrou> Silence "unknown warning option" error on clang
e1a5b4a <Antoine Pitrou> Disable ORC when building benchmarks
06b0665 <Antoine Pitrou> Try to fix Sphinx doc building
9b41d24 <Antoine Pitrou> Add nogil tracing
4014951 <Antoine Pitrou> ARROW-2574: Add Cython and Python code coverage
Author: moriyoshi <mozo@mozo.jp>
Closes#1583 from cpcloud/ARROW-2049 and squashes the following commits:
ca5dbbff [moriyoshi] ARROW-2049: [Python] Try searching for the Cython executable according to sysconfig
The tarballs produced by `setup.py sdist` have always been broken. This creates a tarball that can be installed assuming that the Arrow/Parquet C++ libraries are installed already on the target system.
I wanted to see if I could bundle the `cpp/cmake_modules` files without using a symlink but I couldn't figure it out; it might require subclassing the sdist cmdclass to make this work. I'm not sure having the symlink is so bad
Author: Wes McKinney <wes.mckinney@twosigma.com>
Closes#1188 from wesm/ARROW-1535 and squashes the following commits:
dcc2e47d [Wes McKinney] Fix RAT excludes given changes to cmake files
310af1b7 [Wes McKinney] Move all cmake files to cpp/cmake_modules, fix up sdist tarball so it can be built/installed