ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

4 June 2023
2023-06-04×
4 June 2023
A
Ссылка
click to show
Now that I successfully built my module for windows, it fails with Numpy import_array init macro, I'm considering switching to Python Buffer Protocol https://docs.python.org/3/c-api/buffer.html is there anything available in shiboken to support this? (didn't find anything)
I
id 5062488928text not yet in the index
after trying number of times i decided to run the cross compiling tool with -occp flag, which i hoped would cross-compile python for android which would cut the future build attempts in two, because there will not be that "checking out python and building it in temp directory and deleting it afterwards" step everytime. To my surprise, this did not in fact even try to cross compile python, instead going to compile shiboken. It seems that "-occp" flag really means to "only cross compile pyside" instead
T
In pyside-setup/tools/cross_compile_android/main.py, line 161, there is the hard-coded upstream Python repo url. git clone that somewhere. Then checkout the branch set by PYTHON_VERSION constant hard-coded at the top of the script. (i.e. git checkout 3.10). Then replace the URL in main.py with the local path to your checkout.
I
also, when cpython is being cross-compiled, it tries to link with libssl/libcrypto in /usr/local/lib which predictably fails. I have cross-compiled openssl, but how can i provide it to the cross-build?
T
Hmmm. I can't remember if I had to do that or if it is ok for this to fail. It only needs the cross-compiled Python to build the wheels. And for that, SSL isn't really needed.
I
Ivan Truskovafter trying number of times i decided to run the cross compiling tool with -occp flag, which i hoped would cross-compile python for android which would cut the future build attempts in two, because there will not be that "checking out python and building it in temp directory and deleting it after
occp basically mean "only cross compile python" Basically the tool tries to cross compile Python for the specified Android architecture, and use that Python for the cross compilation. This is the toolchain file template used for cross compiling Python https://code.qt.io/cgit/pyside/pyside-setup.git/tree/tools/cross_compile_android/templates/cross_compile.tmpl.sh As far as i recall, openssl is not required
I
do you want to see the corresponding log?
T
Otherwise it silently fails to do anything
T
from main.py: # line 86 parser.add_argument("-apic", "--android-python-install-path" […] # line 109 python_path = args.android_python_install_path […] # line 119 & 120 valid_python_path = True if python_path and Path(python_path).exists(): # line 155, guarding the full cross compile build step if not python_path or not valid_python_path: When supplying a path that does not exist, python_path is non-empty and Truethy. The block starting 120 is skipped, because the path does not exist. Then in 155, not python_path is False and not valid_python_path is False, because setting it to False was skipped in the block starting at 120. Both checks are False, and the whole block is skipped.
initializing valid_python_path with bool(python_path) and Path(python_path).exists() should mitigate this.
I
Well, to me it seems like a logical error. -occp should be considered first, imho
Calendar: June 2023
Archive by month
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog