-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
szurubooru: 2.5-unstable-2025-02-11 -> 2.5-unstable-2025-07-19, fix build for python3.13 #427826
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
base: master
Are you sure you want to change the base?
Conversation
What the hell is up with szurubooru's dependency on pyheif? That has been broken for a while? How does this even work? |
Still getting the following here, just as before:
Do you know anything about that and/or is this supposed to cover it? |
fix python3.13 related issue with cgi
Hello, sorry for the late reply, I've checked and the tests succeed but it doesn't work when I'm starting it in a VM. I'll try to figure it out |
Ok I don't think I've changed anything in the last push, but it seems to work for me in a tests, VM and on production |
Strangely I'm still getting the above message when using plain "python3"... |
Could you share your config? In particular your flake with the commit it's pointed to (if you're using one) and the szurubooru config |
"Perhaps not having many python apps on my setup, means I don't automatically have the dependencies it might think it has" is what I would've said if this wasn't nixos... |
So I have this at the top of my configuration.nix: pkgsSzuru = import (builtins.fetchTarball {
url = "https://github.com/RatCornu/nixpkgs/archive/f07a87c1e56a3b83f65fb5f1a70d038130ee270c.tar.gz";
}) {}; and then this in services: szurubooru = {
enable = true;
server = {
package = pkgsSzuru.szurubooru.server;
settings = {
name = "My Image Board";
domain = "my-domain.example";
secretFile = "${privateDir}/szuru/secret";
};
port = 9200;
};
database = {
user = "szurubooru";
port = 5432;
name = "szuru";
host = "localhost";
passwordFile = "${privateDir}/szuru/dbpass";
};
client = {
package = pkgsSzuru.szurubooru.client;
};
}; then in services.nginx: "my-domain.example" = {
# http3 = true;
forceSSL = true;
# # enableACME = true;
useACMEHost = "theacmehost"
serverAliases = [];
extraConfig = ''
'';
listenAddresses = [
"[::1]"
"[${localIPv6}]"
"[${globalIPv6}]"
"[::]"
];
locations = {
"/api/" = {
proxyPass = "http://localhost:9200/";
};
"/data/" = {
root = "/var/lib/szurubooru";
};
"/" = {
root = pkgs.szurubooru.client;
tryFiles = "$uri /index.htm";
};
};
}; and finally in security I added the domain into |
Oh okay it's normal you have the problem: you're only changing the version of the package, but the NixOS module I wrote some monthes ago uses a different version of python (the package uses 3.13 and the module 3.12), which causes the error. The easiest fix (if you do not pin your own nixpkgs) is to override the systemd service to use the patched version of it (the one of this PR) |
That's what I think I'm doing by using Is there anything additional I should be doing? |
Yes: with this line, you only changed the version of the package let
python = pkgs.python3;
pyenv = python.buildEnv.override {
extraLibs = [ (python.pkgs.toPythonModule cfg.server.package) ];
};
in
{
systemd.services.szurubooru = {
environment = {
PYTHONPATH = lib.mkForce "${pyenv}/${pyenv.sitePackages}/";
};
path = lib.mkForce (
with pkgs;
[
envsubst
ffmpeg_4-full
]
++ (with python.pkgs; [
alembic
waitress
]));
};
} I didn't test it but I think it should work |
ooh I see thanks. Didn't expect that the package would need this too. I'll try that too thanks |
I ended up having to add some obvious packages like the following:
but then it worked. |
Updated szurubooru to latest bugfix and fixed a build issue caused by a breaking change introduced in python3.13.
Things done
passthru.tests
.nixpkgs-review
on this PR. See nixpkgs-review usage../result/bin/
.Add a 👍 reaction to pull requests you find important.