-
Notifications
You must be signed in to change notification settings - Fork 75
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
use --system-site-packages and install package to omit building 'netifaces' wheel [Calibre-Web] #3503
Conversation
@OzzieIsaacs would you have time to review this PR quick? @jvonau what OS's has this been tested on? Building on:
|
22.04 VM where the compilers were being pulled in due to python3.10 and no wheel. |
Just a reminder from the provided documentation. |
Going through requirements.txt one by one with a basic |
Packages installed
|
Interesting. And a huge amount of work. And might be brittle if OS's / packages keep changing year by year. One wonders if this kind of dependency analysis/validation might hopefully (with a few prayers ;) become partially automated with better tooling one day. |
Took about an hour, suppose I could of written a script to do the parsing.
If an apt package gets dropped in the future sure, could become a frivolous addition when the requirements.txt file calls for a newer version than what is provided by the OS or it might be a good thing when pypi falls behind compiling a package. At any rate this is what was installed into isolated part of the install
Liking to OS deb packages might be a good idea when building a deb package that is going to be deployed by apt keeping the external python packages pulled in to a minimum. No further changes forthcoming, the above was just exploratory work that might help in the future. |
Thanks @jvonau for the above explanations 🏗️ |
This should be tested on Raspberry Pi OS. Which I hope to do in the coming week. If nobody else does that first. Just FYI on IIAB installed earlier on 64-bit RasPiOS Lite,
|
Oops it appears I was wrong above. 64-bit RasPiOS Lite includes apt package Lessons Learned:
|
This comment was marked as outdated.
This comment was marked as outdated.
build-essential is preinstalled on RasPiOS and has been part of the image since pi-gen's inception in 2016. Why? I don't care, but it points to not using RasPiOS when bringing up a new role and figuring out the required dependencies for that role. |
Not pulling in compilers is always a bonus and should be goal when packaging/shipping something that might be on the live internet and it might save some drive space too. |
Related: janeczku/calibre-web#2725 |
I had hoped this PR might solve recent IIAB failures to install Calibre-Web (since about 3 days ago?) But it turns out this PR doesn't quite do the job. Manually installing FYI this PR fails with
Related: |
Your testing is flawed, you are trying to reuse the previously created virtual environment, please remove /usr/local/calibre-web-py3 first. |
added stanza to always remove calibreweb_venv_path shouln't need to manually remove /usr/local/calibre-web-py3 first now. |
runrole --reinstall will now really be a reinstall from scratch. |
The automated deletion of directory
|
Had an un-pushed edit on my U22.04 test vm, should work correctly now |
The latest version of this PR completes on 64-bit RasPiOS Lite on RPi 4. (Is that likely safe enough to cover most all mainline OS's / architectures?) |
All other Ubuntu and Debian variants should behave in the same manner, all would be lacking a compiled netiface wheel for their respective version of Python3.XX. |
Great. And as we have far too many ever-evolving OS's and architectures, let's just ask all to keep an eye on Calibre-Web installs over coming weeks, asking everyone to test mainline/favorites. |
Smaller subset of #3500 without optional-requirements.txt
This works because the wheel is provided by apt, the OS package manager, and with --system-site-packages has access to the system's preinstalled wheels when creating the virtual environment. Normally --system-site-packages would be omitted and the packages would be pulled down from pypi but 'netifaces' doesn't have the latest wheels for python3.10+ but the OS does.