Skip to content
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

calibre-web - compiler and header files only when needed #3498

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

jvonau
Copy link
Contributor

@jvonau jvonau commented Mar 20, 2023

Fixes bug:

Installs a smaller subset of what build-essential installs

Description of changes proposed in this pull request:

install only what is needed to compile 'netifaces' on python3.10 or greater

Smoke-tested on which OS or OS's:

22.04 VM

2 passes to get the dependencies correct

Start-Date: 2023-03-19  21:28:36
Commandline: /usr/bin/apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install gcc=4:11.2.0-1ubuntu1
Requested-By: ubuntu (1000)
Install: manpages-dev:amd64 (5.10-1ubuntu1, automatic), gcc-11:amd64 (11.3.0-1ubuntu1~22.04, automatic), libtsan0:amd64 (11.3.0-1ubuntu1~22.04, automatic), cpp:amd64 (4:11.2.0-1ubuntu1, automatic), gcc:amd64 (4:11.2.0-1ubuntu1), libcc1-0:amd64 (12.1.0-2ubuntu1~22.04, automatic), libmpc3:amd64 (1.2.1-2build1, automatic), libasan6:amd64 (11.3.0-1ubuntu1~22.04, automatic), libnsl-dev:amd64 (1.3.0-2build2, automatic), rpcsvc-proto:amd64 (1.4.2-0ubuntu6, automatic), libcrypt-dev:amd64 (1:4.4.27-1, automatic), cpp-11:amd64 (11.3.0-1ubuntu1~22.04, automatic), libitm1:amd64 (12.1.0-2ubuntu1~22.04, automatic), libc-dev-bin:amd64 (2.35-0ubuntu3.1, automatic), libc-devtools:amd64 (2.35-0ubuntu3.1, automatic), libisl23:amd64 (0.24-2build1, automatic), libc6-dev:amd64 (2.35-0ubuntu3.1, automatic), libquadmath0:amd64 (12.1.0-2ubuntu1~22.04, automatic), libubsan1:amd64 (12.1.0-2ubuntu1~22.04, automatic), liblsan0:amd64 (12.1.0-2ubuntu1~22.04, automatic), gcc-11-base:amd64 (11.3.0-1ubuntu1~22.04, automatic), libtirpc-dev:amd64 (1.3.2-2ubuntu0.1, automatic), libgcc-11-dev:amd64 (11.3.0-1ubuntu1~22.04, automatic), libatomic1:amd64 (12.1.0-2ubuntu1~22.04, automatic), linux-libc-dev:amd64 (5.15.0-67.74, automatic)
End-Date: 2023-03-19  21:28:41

Start-Date: 2023-03-19  21:31:25
Commandline: /usr/bin/apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install python3-dev=3.10.6-1~22.04
Requested-By: ubuntu (1000)
Install: libpython3-dev:amd64 (3.10.6-1~22.04, automatic), zlib1g-dev:amd64 (1:1.2.11.dfsg-2ubuntu9.2, automatic), python3-dev:amd64 (3.10.6-1~22.04), libpython3.10-dev:amd64 (3.10.6-1~22.04.2, automatic), python3.10-dev:amd64 (3.10.6-1~22.04.2, automatic), libjs-jquery:amd64 (3.6.0+dfsg+~3.5.13-1, automatic), libexpat1-dev:amd64 (2.4.7-1ubuntu0.2, automatic), libjs-sphinxdoc:amd64 (4.3.2-1, automatic), javascript-common:amd64 (11+nmu1, automatic), libjs-underscore:amd64 (1.13.2~dfsg-2, automatic)
End-Date: 2023-03-19  21:31:26

On a side note is upstream even aware the project is uninstallable via pip on U-22.04 without having the required compilers installed?

@holta
Copy link
Member

holta commented Mar 20, 2023

On a side note is upstream even aware the project is uninstallable via pip on U-22.04 without having the required compilers installed?

Calibre-Web (@OzzieIsaacs do you have an opinion?) in its install instructions currently asks everyone to install python3-pip (superset package) on Linux:

If IIAB takes a different path, this might hypothetically possibly create install headaches in future? 🤔

ASIDE: has this PR been test-installed on 32-bit and/or 64-bit Raspberry Pi OS?

Addendum:

@holta holta added this to the 8.1 milestone Mar 20, 2023
@OzzieIsaacs
Copy link

If IIAB takes a different path, this might hypothetically possibly create install headaches in future? 🤔

New versions of calibre-web tend towards adding more dependencies, which possible need a compiler installed.
Recently there was a guy also having trouble installing calibre-web on piOS (janeczku/calibre-web#2697) due to a missing rust compiler.

Following the "recommended" path can cause problems just as much as following your own path. From my point of view, it is not foreseeable which will cause more trouble. Both version will need manual rework from time to time.

@holta
Copy link
Member

holta commented Mar 20, 2023

having trouble installing calibre-web on piOS (janeczku/calibre-web#2697) due to a missing rust compiler.

We faced that as well, thankfully now solved with the cryptography package having stabilized 😄

@jvonau
Copy link
Contributor Author

jvonau commented Mar 20, 2023

@OzzieIsaacs The pywheel problem with rust has be solved upstream and compiling cryptography is no longer needed. See the summation at #3496 (comment) now RasPiOS has the 'netifaces' wheel for python3.9 through pywheels for 32bit or pypi for 64bit so no compiling is required but no wheel is available for python3.10 or greater so the python package needs to be compiled. The netifaces looks to be abandoned and is pulled in via some other dependency within requirements.txt as the package in not declared in it. This whole '--break-system-packages' change in python3.11 is going to cause a whole pile of hurt across the python ecosystem when pip3 install package spits back to use a virtual environment going forward. My point of not requiring python3-pip to create a virtual environment has been proven and well maintained python projects have the wheels available to not require compilers.

@jvonau
Copy link
Contributor Author

jvonau commented Mar 20, 2023

ASIDE: has this PR been test-installed on 32-bit and/or 64-bit Raspberry Pi OS?

You tested that path when you were working up #3496 and noted that Ubuntu 22.04 (python3.10) needed to have a compiler present, for RasPiOS (python3.9) the compiler is not required due to having the compiled wheel available and I pointed out where those wheels originate from.

@holta
Copy link
Member

holta commented Mar 20, 2023

Understood.

Let's (someone in the coming week or so) also test this PR on 64-bit Raspberry Pi OS at minimum, prior to merging.

(A lot of school communities using Raspberry Pi love & depend on Calibre-Web, and don't want any risk here. Finally validation on 32-bit Raspberry Pi and Mint 21 if there is time, but if nec that can happen after merging.)

@holta
Copy link
Member

holta commented Mar 20, 2023

Tested on 64-bit Raspberry Pi OS.

There are small in-line doc flaws I'll fix after merged.

@holta holta merged commit f52a749 into iiab:master Mar 20, 2023
@jvonau
Copy link
Contributor Author

jvonau commented Mar 20, 2023

Noted reference to the python3.11 change in pip behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants