Skip to content

ARROW-17868: [C++][Python] Restore the ARROW_PYTHON CMake option - #14273

Merged
kou merged 9 commits into
apache:masterfrom
kou:cpp-cmake-python
Oct 1, 2022
Merged

ARROW-17868: [C++][Python] Restore the ARROW_PYTHON CMake option#14273
kou merged 9 commits into
apache:masterfrom
kou:cpp-cmake-python

Conversation

@kou

@koukou commented Sep 29, 2022

Copy link
Copy Markdown
Member

Restore it but it's marked as a deprecated option. Because the Python component in Apache Arrow C++ was moved to PyArrow by ARROW-16340. It' removed in a feature release.

Users should use CMake presets instead of ARROW_PYTHON but CMake presets requires CMake 3.19 or later.

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@kou

kou commented Sep 29, 2022

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit -g nightly-tests -g nightly-release -g nightly-packaging

@github-actions

This comment was marked as outdated.

@kou

kou commented Sep 29, 2022

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit -g nightly-tests -g nightly-release -g nightly-packaging

@github-actions

This comment was marked as outdated.

Comment threadci/docker/linux-apt-r.dockerfile Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is all this required for R? AFAIR, Python is only used to test PyArrow-R interoperability here.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nealrichardson Do you know what components are needed here?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we can disable ARROW_HDFS. Other components seems necessary. I'll try it.

Comment threaddocs/source/developers/cpp/building.rst Outdated

@jorisvandenbosschejorisvandenbossche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Added a few comments

@jorisvandenbosschejorisvandenbosscheSep 29, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just hardcode this to ON? (the ARROW_PYTHON=ON would have ensured that) I don't think we want to create wheels without dataset enabled?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to create wheels without dataset enabled

I think so but ${ARROW_DATASET} is also used for export PYARROW_WITH_DATASET=${ARROW_DATASET} below. So I think that we use ${ARROW_DATASET} here for consistency. (ARROW_DATASET is initialized by : ${ARROW_DATASET:=ON}.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unrelated to the other changes. Can you give a short reasoning for it?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is unrelated to ARROW_PYTHON. Sorry for including this to this pull request.

OPENSSL_USE_STATIC_LIBS is redundant here because there is -DARROW_DEPENDENCY_USE_SHARED=OFF in this command line. OPENSSL_USE_STATIC_LIBS is set automatically in https://github.com/apache/arrow/blob/master/cpp/cmake_modules/FindOpenSSLAlt.cmake#L48-L52 .

I just found this by sorting CMake options. So I mix this change into this pull request. Sorry.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to be sorry. I was just wondering about the reasoning

Comment on lines 97 to 98

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-DARROW_DATASET=${ARROW_DATASET} \
-DARROW_DATASET=ON \
-DARROW_DATASET=ON \

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks but I choose -DARROW_DATASET=${ARROW_DATASET} for consistency.

Comment threadcpp/CMakePresets.json Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't yet used the presets myself, but shall we include ARROW_DATASET here as well? (that was included with the previous features-python preset.
Maybe you can also keep the exact name to keep it working for people that were using those presets?

cc @wjones127

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm fine not including datasets if it's not required for the Python build. In most workflows with CMakePresets.json, I think we expect developers to create their own presets in CMakeUserPresets.json, which will inherit from the provided once. (See an example here)

Once this is merged, I can send a notice to the mailing list with instructions on how to transition to the new presets. (I need to update my blog post anyways.)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can also keep the exact name to keep it working for people that were using those presets?

It makes sense. I added no -minimal/-maximal versions.

Comment threaddocs/source/developers/python.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my understanding: is the --config Debug needed if you already use CMAKE_BUILD_TYPE=Debug above?

And will this line also build in parallel?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the --config Debug is redundant.

In my experience, it seems to automatically build in parallel, but you can also add the option explicitly.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry. I added this accidentally. I revert this.

I found -j4 isn't suitable here. We can use -j$(nproc) on Linux and -j$(sysctl -n hw.ncpu) on macOS. But I thought that it's better that we use Ninja here. And I started rewriting this for Ninja but I stopped it because this pull request isn't for the change. But this change remained.

kouand others added 8 commits September 30, 2022 05:55
Restore it but it's marked as a deprecated option. Because the Python
component in Apache Arrow C++ was moved to PyArrow by ARROW-16340.
It' removed in a feature release.
Users should use CMake presets instead of ARROW_PYTHON but CMake
presets requires CMake 3.19 or later.
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
@kou

kou commented Sep 29, 2022

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit -g nightly-tests -g nightly-release -g nightly-packaging

@github-actions

Copy link
Copy Markdown

Revision: 954f1ad

Submitted crossbow builds: ursacomputing/crossbow @ actions-a153f6e909

TaskStatus
almalinux-8-amd64Github Actions
almalinux-8-arm64TravisCI
almalinux-9-amd64Github Actions
almalinux-9-arm64TravisCI
amazon-linux-2-amd64Github Actions
amazon-linux-2-arm64TravisCI
centos-7-amd64Github Actions
centos-8-stream-amd64Github Actions
centos-8-stream-arm64TravisCI
centos-9-stream-amd64Github Actions
centos-9-stream-arm64TravisCI
conan-maximumGithub Actions
conan-minimumGithub Actions
conda-cleanAzure
conda-linux-gcc-py310-arm64Azure
conda-linux-gcc-py310-cpuAzure
conda-linux-gcc-py310-cudaAzure
conda-linux-gcc-py310-ppc64leAzure
conda-linux-gcc-py37-arm64Azure
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cpu-r41Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py37-ppc64leAzure
conda-linux-gcc-py38-arm64Azure
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-linux-gcc-py38-ppc64leAzure
conda-linux-gcc-py39-arm64Azure
conda-linux-gcc-py39-cpuAzure
conda-linux-gcc-py39-cudaAzure
conda-linux-gcc-py39-ppc64leAzure
conda-osx-arm64-clang-py310Azure
conda-osx-arm64-clang-py38Azure
conda-osx-arm64-clang-py39Azure
conda-osx-clang-py310Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py37-r41Azure
conda-osx-clang-py38Azure
conda-osx-clang-py39Azure
conda-win-vs2019-py310Azure
conda-win-vs2019-py37-r40Azure
conda-win-vs2019-py37-r41Azure
conda-win-vs2019-py38Azure
conda-win-vs2019-py39Azure
debian-bookworm-amd64Github Actions
debian-bookworm-arm64TravisCI
debian-bullseye-amd64Github Actions
debian-bullseye-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
example-python-minimal-build-fedora-condaGithub Actions
example-python-minimal-build-ubuntu-venvGithub Actions
homebrew-cppGithub Actions
homebrew-r-autobrewGithub Actions
homebrew-r-brewGithub Actions
java-jarsGithub Actions
nugetGithub Actions
python-sdistGithub Actions
r-binary-packagesGithub Actions
test-alpine-linux-cppGithub Actions
test-build-cpp-fuzzGithub Actions
test-build-vcpkg-winGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindAzure
test-conda-python-3.10Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-hdfs-3.2.1Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-0.24Github Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-spark-v3.1.2Github Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-pandas-nightlyGithub Actions
test-conda-python-3.8-spark-v3.2.0Github Actions
test-conda-python-3.9Github Actions
test-conda-python-3.9-dask-latestGithub Actions
test-conda-python-3.9-dask-masterGithub Actions
test-conda-python-3.9-pandas-masterGithub Actions
test-conda-python-3.9-spark-masterGithub Actions
test-debian-10-cpp-amd64Github Actions
test-debian-10-cpp-i386Github Actions
test-debian-11-cpp-amd64Github Actions
test-debian-11-cpp-i386Github Actions
test-debian-11-go-1.17Azure
test-debian-11-python-3Azure
test-debian-c-glibGithub Actions
test-debian-rubyGithub Actions
test-fedora-35-cppGithub Actions
test-fedora-35-python-3Azure
test-fedora-r-clang-sanitizerAzure
test-r-arrow-backwards-compatibilityGithub Actions
test-r-depsource-bundledAzure
test-r-depsource-systemGithub Actions
test-r-dev-duckdbGithub Actions
test-r-devdocsGithub Actions
test-r-gcc-11Github Actions
test-r-gcc-12Github Actions
test-r-install-localGithub Actions
test-r-linux-as-cranGithub Actions
test-r-linux-rchkGithub Actions
test-r-linux-valgrindAzure
test-r-minimal-buildAzure
test-r-offline-maximalGithub Actions
test-r-offline-minimalAzure
test-r-rhub-debian-gcc-devel-lto-latestAzure
test-r-rhub-debian-gcc-release-custom-ccacheAzure
test-r-rhub-ubuntu-gcc-release-latestAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-4.1-opensuse153Azure
test-r-rstudio-r-base-4.2-centos7-devtoolset-8Azure
test-r-rstudio-r-base-4.2-focalAzure
test-r-ubuntu-22.04Github Actions
test-r-versionsGithub Actions
test-skyhook-integrationGithub Actions
test-ubuntu-18.04-cppGithub Actions
test-ubuntu-18.04-cpp-releaseGithub Actions
test-ubuntu-18.04-cpp-staticGithub Actions
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-20.04-cpp-bundledGithub Actions
test-ubuntu-20.04-cpp-thread-sanitizerGithub Actions
test-ubuntu-20.04-python-3Azure
test-ubuntu-22.04-cppGithub Actions
test-ubuntu-c-glibGithub Actions
test-ubuntu-default-docsAzure
test-ubuntu-rubyGithub Actions
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-jammy-amd64Github Actions
ubuntu-jammy-arm64TravisCI
verify-rc-source-cpp-linux-almalinux-8-amd64Github Actions
verify-rc-source-cpp-linux-conda-latest-amd64Github Actions
verify-rc-source-cpp-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-cpp-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-cpp-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-cpp-macos-amd64Github Actions
verify-rc-source-cpp-macos-arm64Github Actions
verify-rc-source-cpp-macos-conda-amd64Github Actions
verify-rc-source-csharp-linux-almalinux-8-amd64Github Actions
verify-rc-source-csharp-linux-conda-latest-amd64Github Actions
verify-rc-source-csharp-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-csharp-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-csharp-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-csharp-macos-amd64Github Actions
verify-rc-source-csharp-macos-arm64Github Actions
verify-rc-source-go-linux-almalinux-8-amd64Github Actions
verify-rc-source-go-linux-conda-latest-amd64Github Actions
verify-rc-source-go-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-go-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-go-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-go-macos-amd64Github Actions
verify-rc-source-go-macos-arm64Github Actions
verify-rc-source-integration-linux-almalinux-8-amd64Github Actions
verify-rc-source-integration-linux-conda-latest-amd64Github Actions
verify-rc-source-integration-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-integration-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-integration-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-integration-macos-amd64Github Actions
verify-rc-source-integration-macos-arm64Github Actions
verify-rc-source-integration-macos-conda-amd64Github Actions
verify-rc-source-java-linux-almalinux-8-amd64Github Actions
verify-rc-source-java-linux-conda-latest-amd64Github Actions
verify-rc-source-java-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-java-macos-amd64Github Actions
verify-rc-source-js-linux-almalinux-8-amd64Github Actions
verify-rc-source-js-linux-conda-latest-amd64Github Actions
verify-rc-source-js-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-js-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-js-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-js-macos-amd64Github Actions
verify-rc-source-js-macos-arm64Github Actions
verify-rc-source-python-linux-almalinux-8-amd64Github Actions
verify-rc-source-python-linux-conda-latest-amd64Github Actions
verify-rc-source-python-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-python-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-python-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-python-macos-amd64Github Actions
verify-rc-source-python-macos-arm64Github Actions
verify-rc-source-python-macos-conda-amd64Github Actions
verify-rc-source-ruby-linux-almalinux-8-amd64Github Actions
verify-rc-source-ruby-linux-conda-latest-amd64Github Actions
verify-rc-source-ruby-linux-ubuntu-18.04-amd64Github Actions
verify-rc-source-ruby-linux-ubuntu-20.04-amd64Github Actions
verify-rc-source-ruby-linux-ubuntu-22.04-amd64Github Actions
verify-rc-source-ruby-macos-amd64Github Actions
verify-rc-source-ruby-macos-arm64Github Actions
verify-rc-source-windowsGithub Actions
wheel-macos-big-sur-cp310-arm64Github Actions
wheel-macos-big-sur-cp310-universal2Github Actions
wheel-macos-big-sur-cp38-arm64Github Actions
wheel-macos-big-sur-cp39-arm64Github Actions
wheel-macos-big-sur-cp39-universal2Github Actions
wheel-macos-mojave-cp310-amd64Github Actions
wheel-macos-mojave-cp37-amd64Github Actions
wheel-macos-mojave-cp38-amd64Github Actions
wheel-macos-mojave-cp39-amd64Github Actions
wheel-manylinux2014-cp310-amd64Github Actions
wheel-manylinux2014-cp310-arm64TravisCI
wheel-manylinux2014-cp37-amd64Github Actions
wheel-manylinux2014-cp37-arm64TravisCI
wheel-manylinux2014-cp38-amd64Github Actions
wheel-manylinux2014-cp38-arm64TravisCI
wheel-manylinux2014-cp39-amd64Github Actions
wheel-manylinux2014-cp39-arm64TravisCI
wheel-windows-cp310-amd64Github Actions
wheel-windows-cp37-amd64Github Actions
wheel-windows-cp38-amd64Github Actions
wheel-windows-cp39-amd64Github Actions

@kou

kou commented Sep 29, 2022

Copy link
Copy Markdown
MemberAuthor

I think that this is ready to merge.
Build failures aren't related to this change.

@kou
kou merged commit 89c0214 into apache:masterOct 1, 2022
@kou
kou deleted the cpp-cmake-python branch October 1, 2022 11:46
@ursabot

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 4dfa617 and contender = 89c0214. 89c0214 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.31% ⬆️0.0%] test-mac-arm
[Failed ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.11% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 89c0214f ec2-t3-xlarge-us-east-2
[Finished] 89c0214f test-mac-arm
[Failed] 89c0214f ursa-i9-9960x
[Finished] 89c0214f ursa-thinkcentre-m75q
[Finished] 4dfa6176 ec2-t3-xlarge-us-east-2
[Failed] 4dfa6176 test-mac-arm
[Failed] 4dfa6176 ursa-i9-9960x
[Finished] 4dfa6176 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@kou@ursabot@jorisvandenbossche@pitrou@wjones127