7 Commits
Author SHA1 Message Date
Sandro d3d96a151e GH-40566: [C++] Fix 3.12 Python support (#40322)
sysconfig is available since Python 3.2

Tested on nixpkgs and works as expected

### Rationale for this change

Support Python 3.12

### What changes are included in this PR?

### Are these changes tested?

Yes

### Are there any user-facing changes?

No

* GitHub Issue: #40566

Authored-by: Sandro <sandro.jaeckel@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
2024-03-15 02:23:30 +01:00
Sutou Kouhei 11b140a734 GH-34921: [C++][Python][Java] Require CMake 3.16 or later (#35921)
### Rationale for this change

We need to support Ubuntu 20.04 (CMake 3.16) or later, CentOS 7 (CMake 3.17) or later, and Debian GNU/Linux bullseye (CMake 3.18) or later.

So we can require CMake 3.16 or later.

### What changes are included in this PR?

Require CMake 3.16 or later.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: #34921

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2023-06-27 14:53:32 +09:00
Sutou Kouhei 93b63e8f3b ARROW-12175: [C++] Fix CMake packages (#13892)
ARROW-9171 and ARROW-17231 are also fixed.

Our CMake packages are broken. For example, `find_package(Parquet)`
doesn't work without specifying `CMAKE_MODULE_PATH`.

`find_package(${PACKAGE})` searches
`${PREFIX}/${PACKAGE}/${PACKAGE}Config.cmake` or
`${PREFIX}/${PACKAGE}/Find${PACKAGE}.cmake`. But our .cmake files are
always installed `${PREFIX}/arrow/`. So `find_package(Parquet)` can't find
`${PREFIX}/arrow/FindParquet.cmake` because "`/arrow/`" isn't
"`/${PACKAGE}`".

This change fixes this by installing `${PACKAGE}Config.cmake` to
`${PREFIX}/${PACKAGE}/` instead of `${PREFIX}/arrow/`.

This also removes all `Find${PACKAGE}.cmake`. We only provides
`${PACKAGE}Config.cmake`. Our `Find${PACKAGE}.cmake` can find `${PACKAGE}`
by CMake, pkg-config or manual .so/.h search. But we don't need to
support pkg-config nor manual .so/.h search. We can use
`${PACKAGE}Config.cmake` to support CMake package search. So this
removes all `Find${PACKAGE}.cmake`.

This also introduces namespace to our CMake targets. For example,
`arrow_shared` is exported as `Arrow::arrow_shared` and
`parquet_static` is exported as `Parquet::parquet_static`. But no
namespace targets such as `arrow_shared` and `parquet_static` are
still also exported for keeping backward compatibility. But this
requires CMake 3.18 or later for users because `add_library(ALIAS)`
for non-global `IMPORTED` library is available since CMake 3.18.

(`Plasma::plasma-store-server` target is also added for
`plasma-store-server` executable.)

FYI: We can resolve this problem by using `COMPONENTS` feature of
`find_package()`. For example, `find_package(Arrow COMPONENTS
Parquet)` is used instead of `find_package(Parquet)`. With
`COMPONENTS`, `${PACKAGE}` is always "Arrow". So we can still install
our .cmake files to `${PREFIX}/arrow/`. But this approach breaks
backward compatibility. So I choose `${PREFIX}/${PACKAGE}/*.cmake`
approach.


Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2022-08-30 13:57:58 +09:00
Sutou Kouhei d8173f7614 ARROW-16474: [C++][Packaging] Require Python 3.7 or later
Closes #13079 from kou/packaging-linux-drop-python-3.6-support

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2022-05-08 05:17:05 +09:00
Krisztián Szűcs 9aaf61c044 ARROW-8459: [Dev][Archery] Use a more recent cmake-format
- [x] bump cmake-format's version to the latest one
- [x] port `run-cmake-format.py` script to archery
- [x] support `archery lint --cmake-format` format checks without reformatting the files in-place
- [x] support `archery lint --cmake-format --fix` for actually reformat the files
- [x] reformat the cmake files

I assume we may need tune the options a little bit, so feel free to experiment with the values defined in `cmake-format.py` then re-run `archery-lint --cmake-format --fix`.

The `cmakelang` package also provides a `cmake-lint` command which we could experiment with in the future.

Closes #10571 from kszucs/update-cmake-format

Authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2021-06-24 05:25:05 +09:00
Antoine Pitrou 625bf3f8ae ARROW-10363: [Python] Remove CMake bug workaround in manylinux
The bug was fixed in 3.18.0:
https://gitlab.kitware.com/cmake/cmake/-/issues/20425

Closes #8500 from pitrou/ARROW-10363-remove-cmake-bug-workaround

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2020-10-22 09:54:29 +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