Build failure under Termux: can not execute sklearn/_build_utils/version.py

### Describe the bug

When attempting to install the newest (and older) versions of scikit-learn-1.6.dev0 using regular pip install, the installation fails due to a missing version.py file. This issue occurs on an Android system using Termux.
Environment details:
OS: Linux localhost 4.14.186+ (Android)
Architecture: aarch64
Python: 3.11
The error occurs during the Meson build process, which tries to execute a non-existent file:
/data/data/com.termux/files/home/downloads/scikit-learn/sklearn/_build_utils/version.py
A workaround patch has been developed to address this issue:
```
#!/bin/bash

# Navigate to the scikit-learn directory, e.g.:
cd ~/downloads/scikit-learn

# Extract version from pyproject.toml and remove "dev" suffix
VERSION=$(grep 'version =' pyproject.toml | sed 's/version = "\(.*\)"/\1/' | sed 's/\.dev0//')

# Create the directory if it doesn't exist
mkdir -p sklearn/_build_utils

# Create the version.py file with the correct content
cat << EOF > sklearn/_build_utils/version.py
#!/usr/bin/env python
print('${VERSION}')
EOF

# Make the file executable
chmod +x sklearn/_build_utils/version.py

echo "Created sklearn/_build_utils/version.py with version ${VERSION}"
```
This patch:
- Extracts the version number from pyproject.toml
- Removes the "dev" suffix
- Creates the missing version.py file with a generic Python shebang
- Makes the file executable

After applying this patch, the Meson build process completes successfully, and the installation can proceed: 
```
cpu family: aarch64
Host machine cpu: aarch64
Compiler for C supports arguments -Wno-unused-but-set-variable: YE
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-conversion: YES
Compiler for C supports arguments -Wno-misleading-indentation: YES
Library m found: YES
Program python3 found: YES (/data/data/com.termux/files/usr/bin/python3.11)
Run-time dependency OpenMP for c found: YES 5.1
Found pkg-config: YES (/data/data/com.termux/files/usr/bin/pkg-config) 0.29.2
Run-time dependency python found: YES 3.11    Build targets in project: 111
Found ninja-1.11.1.git.kitware.jobserver-1 ...
```
and:
```
Successfully installed scikit-learn-1.6.dev0  ~/downloads/scikit-learn $
```

### Steps/Code to Reproduce

pip install -U -v scikit-learn

### Expected Results

.

### Actual Results

.

### Versions

```shell
scikit-learn-1.6.dev0, and older
```

COMMENT:
Anecdote - so many months afterwards, when Termux apt has just upgraded Python version itself to 3.12, I have had to reinstall a lot of packages, some by hand. Of course many failed to (re)install out of the box ([https://github.com/m-bain/whisperx](https://github.com/m-bain/whisperx), [https://github.com/coqui-ai/tts](https://github.com/coqui-ai/tts)) also due to their scikit-learn dependencies,  so I had to check in the closed Github Issues, like this one, how I had done it months ago. 
Only your tip, this [one](https://github.com/scikit-learn/scikit-learn/issues/29367#issuecomment-2204280489), helped me remember. 

So even such closed issues serve a purpose, as a memory jog!  

In short - install the above tools, etc.  to get yet again: 

`  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.19.5 in /data/data/com.termux/files/usr/lib/python3.12/site-packages (from scikit-learn) (2.0.2)
Requirement already satisfied: scipy>=1.6.0 in /data/data/com.termux/files/usr/lib/python3.12/site-packages (from scikit-learn) (1.14.1)
Collecting joblib>=1.2.0 (from scikit-learn)
  Obtaining dependency information for joblib>=1.2.0 from https://files.pythonhosted.org/packages/91/29/df4b9b42f2be0b623cbd5e2140cafcaa2bef0759a00b7b70104dcfe2fb51/joblib-1.4.2-py3-none-any.whl.metadata
  Downloading joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB)
Collecting threadpoolctl>=3.1.0 (from scikit-learn)
  Obtaining dependency information for threadpoolctl>=3.1.0 from https://files.pythonhosted.org/packages/4b/2c/ffbf7a134b9ab11a67b0cf0726453cedd9c5043a4fe7a35d1cefa9a1bcfb/threadpoolctl-3.5.0-py3-none-any.whl.metadata
  Downloading threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB)
Downloading joblib-1.4.2-py3-none-any.whl (301 kB)
Downloading threadpoolctl-3.5.0-py3-none-any.whl (18 kB)
Building wheels for collected packages: scikit-learn
  Running command Building wheel for scikit-learn (pyproject.toml)
  Building wheel for scikit-learn (pyproject.toml) ... done
  Created wheel for scikit-learn: filename=scikit_learn-1.5.2-cp312-cp312-linux_aarch64.whl size=17823884 sha256=2aec910a8bb72febfe6eb3e95df1982ebfd7968e7eb535708ced1a912372cef9
  Stored in directory: /data/data/com.termux/files/home/.cache/pip/wheels/32/7c/09/394e0b8c61d79f3ba945f54ffc1c5e82b19094fdf242012c50
Successfully built scikit-learn
Installing collected packages: threadpoolctl, joblib, scikit-learn
Successfully installed joblib-1.4.2 scikit-learn-1.5.2 threadpoolctl-3.5.0
`

- and only then go on with whisperx, tts, etc. that also need some git cloning and tweaking up to convince them that e.g. "python 3.12 is ok here, in fact".

Labels: Build / CI, Low Priority