10 Commits
Author SHA1 Message Date
Pratyush Adhikari b8e2df40f0 GH-50702: [Python] Fix .pyx changes requiring two builds to take effect (#50719)
### 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>
2026-07-30 11:10:33 +02:00
Lysandros NikolaouandSutou Kouhei e8e9d1ac2b GH-43536: [Python] Declare support for free-threading in Cython (#43606)
### 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>
2024-08-14 08:46:02 +09:00
Sutou Kouhei df4cb95889 ARROW-17838: [Python] Unify CMakeLists.txt in python/ (#14925)
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>
2022-12-22 05:27:36 +09:00
Alessandro Molina 082b11e9ec ARROW-13239: [Python] [Doc] Expose signatures in pyx modules
Closes #10684 from amol-/ARROW-13239

Authored-by: Alessandro Molina <amol@turbogears.org>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
2021-07-16 13:36:54 +02:00
Alessandro Molina c5a9f5550e ARROW-12793: [Python] Fix support for pyarrow debug builds
Closes #10324 from amol-/ARROW-12793

Authored-by: Alessandro Molina <amol@turbogears.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
2021-05-14 15:44:42 -04:00
Kazuaki Ishizaki aa2e6d495d ARROW-10384: [C++] Fix typos
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>
2020-10-25 03:48:26 +09:00
Antoine Pitrou c707d8b121 ARROW-7917: [C++] Find Python 3 in CMake configuration
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>
2020-03-03 09:26:56 +09:00
Antoine Pitrou 7764bc8890 ARROW-2574: [Python] Add Cython and Python code coverage
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
2018-05-17 16:21:47 +02:00
moriyoshi 9d9cc8f79e ARROW-2049: [Python] Use python -m cython to run Cython, instead of CYTHON_EXECUTABLE
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
2018-02-10 11:05:06 -05:00
Wes McKinney a0555c04dd ARROW-1535: [Python] Enable sdist tarballs to be installed
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
2017-10-08 21:09:03 -04:00