termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.43k stars 2.88k forks source link

python pkg error : regex #20260

Closed shaheen-coder closed 2 weeks ago

shaheen-coder commented 2 weeks ago

Problem description

I can't install python pakage 'regex'

What steps will reproduce the bug?

pip install regex

What is the expected behavior?

Idk

System information

Termux Variables:                                 TERMUX_APK_RELEASE=F_DROID                        TERMUX_APP_PACKAGE_MANAGER=apt                    TERMUX_APP_PID=24230                              TERMUX_IS_DEBUGGABLE_BUILD=0                      TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0                            TERMUX__USER_ID=0
Packages CPU architecture:                        aarch64
Subscribed repositories:                          # sources.list                                    deb https://packages-cf.termux.dev/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11 x11 main
Updatable packages:
command-not-found/stable 2.4.0-25 aarch64 [upgradable from: 2.4.0-24]                               libltdl/stable 2.4.7-4 aarch64 [upgradable from: 2.4.7-1]
svt-av1/stable 2.1.0 aarch64 [upgradable from: 2.0.0]
termux-tools version:
1.42.1
Android version:
12
Kernel build information:
Linux localhost 4.19.191-perf-01022-gec293e668c0c #1 SMP PREEMPT Fri Mar 10 18:54:33 CST 2023 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
22120RN86G
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
TomJo2000 commented 2 weeks ago

Regex (re) is part of Python's standard library, it doesn't need to be installed separately.

https://docs.python.org/3.11/library/re.html

2096779623 commented 2 weeks ago

https://github.com/termux/termux-packages/issues/20039#issuecomment-2096494418

~ $ _file="$(find $PREFIX/lib/python3.11 -name "_sysconfigdata*.py")"
FIX/lib/python3.11/__pycache__
cp $_file "$_file".backup
sed -i 's|-fno-openmp-implicit-rpath||g' "$_file"~ $ rm -rf $PREFIX/lib/python3.11/__pycache__
~ $ cp $_file "$_file".backup
~ $ sed -i 's|-fno-openmp-implicit-rpath||g' "$_file"
~ $ pip3 install regex
Collecting regex
  Using cached regex-2024.5.15.tar.gz (394 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: regex
  Building wheel for regex (pyproject.toml) ... done
  Created wheel for regex: filename=regex-2024.5.15-cp311-cp311-linux_aarch64.whl size=536980 sha256=960c9017a4977e853fba7d5766d7753b10e9ad3effa83b9df5c4922a633f9567
  Stored in directory: /data/data/com.termux/files/home/.cache/pip/wheels/d9/7a/47/a8a60fdaddb161682c831a5d3a8770bde0017531f6301391cd
Successfully built regex
Installing collected packages: regex
Successfully installed regex-2024.5.15
~ $