GH-36411: [Python] Use scikit-build-core as build backend for PyArrow and get rid of setup.py#49259
GH-36411: [Python] Use scikit-build-core as build backend for PyArrow and get rid of setup.py#49259raulcd wants to merge 32 commits intoapache:mainfrom
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@github-actions crossbow submit -g python |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit wheel-*-cp313-cp313-amd64 |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit wheel-windows-cp313-cp313-amd64 |
|
Revision: 166ff63 Submitted crossbow builds: ursacomputing/crossbow @ actions-f1bbdf4eaa
|
|
@github-actions crossbow submit wheel-windows-cp313-cp313-amd64 |
|
Revision: 36fefd4 Submitted crossbow builds: ursacomputing/crossbow @ actions-bd811d95ea
|
|
@github-actions crossbow submit -g python -g wheel |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit python-sdist |
|
Revision: c518c90 Submitted crossbow builds: ursacomputing/crossbow @ actions-ea249e92ce
|
|
@github-actions crossbow submit python-sdist |
|
Revision: 131e2c0 Submitted crossbow builds: ursacomputing/crossbow @ actions-1c58e78aff
|
|
@github-actions crossbow submit python-sdist |
|
Revision: 30e04be Submitted crossbow builds: ursacomputing/crossbow @ actions-3179f97956
|
|
@github-actions crossbow submit -g python -g wheel |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit wheel-windows-cp313-cp313-amd64 |
|
Revision: 5606749 Submitted crossbow builds: ursacomputing/crossbow @ actions-3c4293e220
|
cdd7629 to
1110dbe
Compare
|
Revision: 685fd06 Submitted crossbow builds: ursacomputing/crossbow @ actions-405c7c8fd5
|
Thanks @jorisvandenbossche ! Let me investigate where the log is coming from. I can see on the job you pointed we are using: |
|
@jorisvandenbossche this seems to happen only on conda environments and is due to scikit-build-core ignoring the default CMAKE_ARGS that conda sets (see I am unsure why conda defines a default |
|
@github-actions crossbow submit wheel-windows-cp313-cp313-amd64 |
|
Revision: d5a61ab Submitted crossbow builds: ursacomputing/crossbow @ actions-c69c0863fa
|
…aragraph about old PYARROW_CMAKE_OPTIONS for reference
|
@github-actions crossbow submit wheel-windows-cp313-cp313-amd64 |
|
Revision: 9c6cf8b Submitted crossbow builds: ursacomputing/crossbow @ actions-b68682bb32
|
| On PyArrow 24.0.0 we migrated our Python build backend from setuptools to | ||
| scikit-build-core, which is a CMake-based build system. Previous versions used | ||
| ``PYARROW_CMAKE_OPTIONS`` environment variable to pass CMake options in the form of | ||
| ``-D<OPTION>=<VALUE>``. This is no longer supported. | ||
| Instead, use the ``-C cmake.args=-D<OPTION>=<VALUE>`` option as described above. |
There was a problem hiding this comment.
| On PyArrow 24.0.0 we migrated our Python build backend from setuptools to | |
| scikit-build-core, which is a CMake-based build system. Previous versions used | |
| ``PYARROW_CMAKE_OPTIONS`` environment variable to pass CMake options in the form of | |
| ``-D<OPTION>=<VALUE>``. This is no longer supported. | |
| Instead, use the ``-C cmake.args=-D<OPTION>=<VALUE>`` option as described above. | |
| On PyArrow 24.0.0 we migrated our Python build backend from setuptools to | |
| scikit-build-core, which is a CMake-based build system. Previous versions used | |
| ``PYARROW_BUILD_TYPE`` and ``PYARROW_CMAKE_OPTIONS`` environment variables | |
| to customize the CMake invocation. This is no longer supported. | |
| Instead, use the ``-C cmake.build-type=<build_type>`` and ``-C cmake.args=-D<OPTION>=<VALUE>`` option as described above. |
Small suggestion to include PYARROW_BUILD_TYPE as well (for my local setup, that is the main one I have to update)
Rationale for this change
Move our PyArrow build backend from setuptools and a custom setup.py to scikit-build-core which is just build backend for CMake related projects.
What changes are included in this PR?
Move from setuptools to scikit-build-core and remove PyArrow setup.py. Update some of the build requirements and minor fixes.
A custom build backend has been also been created in order to wrap scikit-build-core in order to fix problems on License files for monorepos.
pyproject.toml metadata validation expects license files to exist before exercising the build backend that's why we create symlinks. Our thin build backend will just make those symlinks hard-links in order for license and notice files to contain the contents and be added as part of the sdist.
Remove flags that are not used anymore (were only part of setup.py) and documented and validated how the same flags have to be used now.
Are these changes tested?
Yes all Python CI tests, wheels and sdist are successful.
Are there any user-facing changes?
Yes, users building PyArrow will now require the new build dependencies to exercise the build and depending on the flags used they might require to use the new documented way of using those flags.