raulcd commented on code in PR #45854:
URL: https://github.com/apache/arrow/pull/45854#discussion_r2690463682
##########
ci/scripts/python_sdist_build.sh:
##########
@@ -23,5 +23,9 @@ source_dir=${1}/python
pushd "${source_dir}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${PYARROW_VERSION:-}
-${PYTHON:-python} setup.py sdist
+# Meson dist must be run from a VCS, so initiate a dummy repo
+git init .
+git add --all .
+git commit -m "dummy commit for meson dist"
+${PYTHON:-python} -m build --sdist .
Review Comment:
I've tried a couple of things to try and fix sdist:
```diff
diff --git a/ci/scripts/python_sdist_build.sh
b/ci/scripts/python_sdist_build.sh
index 7bea9c3dc1..a8d849183c 100755
--- a/ci/scripts/python_sdist_build.sh
+++ b/ci/scripts/python_sdist_build.sh
@@ -24,8 +24,12 @@ source_dir=${1}/python
pushd "${source_dir}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${PYARROW_VERSION:-}
# Meson dist must be run from a VCS, so initiate a dummy repo
-git init .
-git add --all .
-git commit -m "dummy commit for meson dist"
+#git init .
+#git config --global --add safe.directory "${source_dir}"
+#git config --global user.name "Your Name"
+#git config --global user.email [email protected]
+#git add --all .
+#git commit -m "dummy commit for meson dist"
+${PYTHON:-python} -m pip install build
${PYTHON:-python} -m build --sdist .
popd
```
I am unsure whether creating the git repo is necessary (we are already
cloning arrow) and `build` seems missing from this docker image.
The problem now is that it seems to want to build pyarrow (requires
build-tools), even though building only the sdist shouldn't require building
pyarrow as far as I understand:
```
+ /arrow-dev/bin/python -m build --sdist .
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- cython >= 3.1
- meson-python
- numpy>=1.25
- setuptools_scm[toml]>=8
* Getting build dependencies for sdist...
* Installing packages in isolated environment:
- ninja >= 1.8.2
* Building sdist...
+ meson setup /arrow/python /arrow/python/.mesonpy-f5plfyxb
-Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md
--native-file=/arrow/python/.mesonpy-f5plfyxb/meson-python-native-file.ini
The Meson build system
Version: 1.10.0
Source dir: /arrow/python
Build dir: /arrow/python/.mesonpy-f5plfyxb
Build type: native build
Project name: pyarrow
Project version: 23.0.0.dev362+gce85d064a.d20260114
../meson.build:18:0: ERROR: Unknown compiler(s): [['c++'], ['g++'],
['clang++'], ['nvc++'], ['pgc++'], ['icpc'], ['icpx']]
The following exception(s) were encountered:
Running `c++ --version` gave "[Errno 2] No such file or directory: 'c++'"
Running `g++ --version` gave "[Errno 2] No such file or directory: 'g++'"
Running `clang++ --version` gave "[Errno 2] No such file or directory:
'clang++'"
Running `nvc++ --version` gave "[Errno 2] No such file or directory: 'nvc++'"
Running `pgc++ --version` gave "[Errno 2] No such file or directory: 'pgc++'"
Running `icpc --version` gave "[Errno 2] No such file or directory: 'icpc'"
Running `icpx --version` gave "[Errno 2] No such file or directory: 'icpx'"
A full log can be found at
/arrow/python/.mesonpy-f5plfyxb/meson-logs/meson-log.txt
ERROR Backend subprocess exited when trying to invoke build_sdist
```
If I install `build-essential` it fails locating Arrow CPP because it's
basically trying to build pyarrow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]