-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] dissociate python optional test wheels builds + python313 #6282
base: master
Are you sure you want to change the base?
Conversation
@hgy59 I'll let this run but this patch in particular 9c764a7 needs to be in its own PR... interesting from not having noticed it earlier. I'll also mark as [WIP] as not even close to be merged, this was early work being push to initiate exchange with python github relatively to the build issue I had. |
@hgy59
|
@th0ma7 I will remove this in #6269. It is obsolete since spksrc image on debian 12. |
@hgy59, @mreid-tt and other @SynoCommunity/developers I'd appreciate having some thoughts on this... I always kept within Doing so I thought why not building them all and include other remanants dispersed into other sub
Then I recall someone mentioning a while back ago, why not having our own wheel repository?
Thoughts on this would be much appreciated. Also on my TODO (to which babysteps may be best):
|
@th0ma7, I’m not very experienced with Python builds, so I had to familiarize myself with the basics (e.g., using Real Python's guide on wheels). Here are some initial thoughts:
I might be missing some key points due to my limited background, so I'd appreciate more details. For instance, you mentioned integrating other "remnants" scattered across sub SPKs. What exactly are these remnants, and what benefits would centralizing them bring? Are they also related to test code? Regarding the internal wheel repository, is it a matter of PyPI's offerings being insufficient? Are there commonly missing platform-specific wheels for Synology hardware? Would it be feasible to advocate for the Python Package Index to include the wheels we need, perhaps by reaching out to the relevant projects and requesting support? I might not fully grasp the situation, but I’m keen to understand the challenges better and contribute more meaningful suggestions. |
Indeed. Package could even be renamed similarly.
Not really. That would mostly be just a web page listing our wheels, that you can query through
Issue is, pypi provides tons of pre-compiled wheels but ppc, armv5, (and often armv7 and even aarch64) are always missing. Therefore, on our NAS at installation time Therefore when we build our spk package using our spksrc framework, we pull source packages from pypi usng
The challenge is that the python wheel build system is undergoing a lot of changes currently and impacting the overall wheel building approaches. As pypi modules documentation and maintenance varies from one to the next, this ends-up breaking things all over the place. So question is, would it be easier to have a single location to manage all wheel cross-compiling, providing numerous versions online to ease package management? I've been thinking of this a little more and still unsure, further as this would probably mean statically linking wheels so it is compatible with any installation OR using rpath so dependencies are available from that |
It makes sense to have our own repository. Although it will be quite a lot of work to implement and significantly add to maintenance burden.. |
bb787f5
to
a7a0997
Compare
@hgy59 I believe I may now have a feature-wise functional code ready for testing... I'll be away next week (SC24) so cycles until my return may be limited. Although I would much like your opinion on this invasive but in theory fully backward compatible code change. TL;DR;
Nice addition (from my perspective), ability to re-generate crossenv on demand (see description above for howto). Besides the non-blocker TODO items, in theory it should be ready for testing and shaking out bugs and/or adjusting proposed strategy. I'm mostly thinking of weird corner-cases, such as the ones found in homeassistant that I hope can be addressed with this (to be tested + wheel specific crossenv configurations to be created). Let me know if you have a moment to test-bed this, your pair of 👀 would be much appreciated. Lastly: I did not forgot you with your requirement to join ffmpeg + wheel cross-compiling. With the previous addition of EDIT: Looking at github-action output it seems there are still a few rough edges to look for... on my todo list. |
initial analysis: when building python311 for the first time, the
when you call make again, the but after call the the variables are set (and build finally succeeds):
|
some more details to the analysis above all lines from build log starting with
This shows that
the first has correct variables, but the second is missing the python version This might trigger you... |
@th0ma7 another idea I want to share When wheels couldn't be built without additional wheels in crossenv (like expandvars to build frozenlist), I was looking in the |
That would be elegant indeed, and this pr could set the stage as a start to move towards gainin more flexibility with wheel building. |
@hgy59 now fixed and ready for testing. I also migrated the code to make use of status cookie handling like other pieces of the framework which simplify things a lot. If by any chances you have a moment to look at py313 cross-compiling... they moved away from |
not yet testing... it fails to install For DSM6.2.4 it fails to install We must either
List of additional modules installed into crossenv (those are not listed in
|
@hgy59 question of managing expectations... This PR really still is a I was hoping that at this stage it could be tested to confirm wetter this suffice to resolve the immediate build failures we have and allow getting reproducibility back for some of our packages (
Interestingly it's only python 3.13 that fails, and I'm glad it only fails on this as I had other issues previously which now looks solved, at least thru github-action.
The
Currently testing that to see if this helps... Also, on my local branch cross/python313 currenly fails with the following but builds fine using
I'll have another look at it upon my return (feel free to push fixes if you hapen to have cycles).
I tried this... and it's really tricky as ordering of install is important. On the other hand that may ease passing But you're right, while downgrading
yup, due to the dependency chain as we need to provide all dependencies for cross-compiling to actually work. I find it handy to print the list of crossenv installed wheels to track exactly what is the build environment in use when cross-compiling. Lastly, my next step is to review the wheel building code to use status cookies and be closer to the remaining of the framework code. I want to divide it such as the following for a start:
So then it will become much easier to maintain and add extra functionalities as needed such as meson and cmake toolchain file support, and potentially automating |
Qoriq failure may be related to python/cpython#125269 |
6c89b34
to
89dcd4c
Compare
@th0ma7 finding issues on gh probably you can reproduce issues locally by use of make clean (this is not so slow, since we have prebuilt python). |
@hgy59 one of the key thing I noticed is Further, I noticed a few legacy python things in there needing to be cleaned-up... something for a different PR. As for debuging, the best would be to find out how (and if it is possible) to get into the gh container directly. I haven't search howto yet, I'll leave this one complete to confirm if a few things got fixed already. |
@hgy59 🚀 now time for some code cleanups... |
- add evaluation of python313 dependent packages - evaluate packages to build and changed dependency folders in build.yml to avoid overflow of bash variables (limited to 1024 chars) (fixes SynoCommunity#6284)
@th0ma7 sorry for adding a fix for #6284 to this PR, but it would be too much effort to create a dedicated PR to reproduce this error to fix it. It is still possible that not all packages are found by dependencies because the DEPENDENCY_LIST variable still might be truncated (at 1024 chars). This will be (hopefully) fixed in #6255. |
@hgy59 i sincerely have no clue. And I had not looked into why |
- python dependent packages with name sorted after python31* where removed from packages to build (in this context: python-wheels and rdiff-backup)
it was the alphabetic order (python-wheels and rdiff-backup were skipped) - now fixed. BTW currently it fails to download python sources (403 forbidden) so all is red... |
@th0ma7 my local build of python-wheels succeeded only for the following archs
all other archs fail to build |
- add space to separate packages
known issue python/cpython#127307 |
I thought I had it fixed, but it's been a while. Let me double check, then hopefully this can get moved into a distinct pr. |
@hgy59 I'm getting this weird build failure with openssl3 only with qoriq, rings any bell?
|
@hgy59 getting Otherwise, this |
unfortunaltely build of python-wheels is still missing here... |
Description
Intent is to:
python310
/python311
baseMakefiles
to ease updatespython313
package (potentially also addpython312
)crossenv
creation frompython3*/Makefile
-> Now usesspksrc.crossenv.mk
crossenv
enablement using amk/crossenv/
directory containing wheel crossenv definitions:Checklist
all-supported
completed successfullyType of change
TODO
spksrc.wheel.mk
to use$(which cross-pip)
$HOME/.cache/pip
requirements.txt
entry with trailing commenttest==1234 # This is a test wheel
$(HOME)/.cache/pip
OPENSSL_*_DIR
variables and logic usage throughout python related mk filescrossenv
add status info tostatus-build.log
filespksrc.python-wheel.mk
to use status cookie to avoid always rebuildingzlib
creation + remove of symlinks from spksrc.python.mk to eliminate rebuilding