Merge pull request #302013 from slotThe/anki-24.04

anki: 23.12.1 -> 24.04
This commit is contained in:
Thiago Kenji Okada 2024-04-23 10:28:51 +01:00 committed by GitHub
commit b58121a511
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 917 additions and 684 deletions

View File

@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, setuptools-scm
, fetchFromGitLab
}:
buildPythonPackage rec {
pname = "git-versioner";
version = "7.1";
pyproject = true;
src = fetchFromGitLab {
owner = "alelec";
repo = "__version__";
rev = "v${version}";
hash = "sha256-bnpuFJSd4nBXJA75V61kiB+nU5pUzdEAIScfKx7aaGU=";
};
nativeBuildInputs = [
setuptools-scm
];
pythonImportsCheck = [
"__version__"
];
meta = with lib; {
description = "Manage current / next version for project";
homepage = "https://gitlab.com/alelec/__version__";
license = licenses.mit;
maintainers = with maintainers; [ slotThe ];
};
}

View File

@ -0,0 +1,43 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools-scm
, wheel
, git-versioner
, wrapt
}:
buildPythonPackage rec {
pname = "pip-system-certs";
version = "4.0";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "pip_system_certs";
hash = "sha256-245qMTiNl5XskTmVffGon6UnT7ZhZEVv0JGl0+lMNQw=";
};
nativeBuildInputs = [
setuptools-scm
wheel
git-versioner
];
propagatedBuildInputs = [
wrapt
];
pythonImportsCheck = [
"pip_system_certs.wrapt_requests"
"pip_system_certs.bootstrap"
];
meta = with lib; {
description = "Live patches pip and requests to use system certs by default";
homepage = "https://gitlab.com/alelec/pip-system-certs";
license = licenses.bsd2;
maintainers = with maintainers; [ slotThe ];
};
}

View File

@ -68,6 +68,9 @@ buildPythonPackage rec {
"test_compile_recursive_extras"
"test_combine_different_extras_of_the_same_package"
"test_diff_should_not_uninstall"
"test_cli_compile_all_extras_with_multiple_packages"
# Deprecations
"test_error_in_pyproject_toml"
];
pythonImportsCheck = [

View File

@ -1,21 +1,22 @@
diff --color -ru a/piptools/scripts/compile.py b/piptools/scripts/compile.py
--- a/piptools/scripts/compile.py 2022-06-30 11:24:26.000000000 +0200
+++ b/piptools/scripts/compile.py 2022-08-01 13:40:58.392515765 +0200
@@ -6,7 +6,7 @@
from typing import IO, Any, BinaryIO, List, Optional, Tuple, Union, cast
diff --git a/piptools/scripts/compile.py b/piptools/scripts/compile.py
index 195faa7..3e69437 100755
--- a/piptools/scripts/compile.py
+++ b/piptools/scripts/compile.py
@@ -9,7 +9,7 @@ from pathlib import Path
from typing import IO, Any, BinaryIO, cast
import click
-from build import BuildBackendException
+from build import BuildException
from build.util import project_wheel_metadata
from click.utils import LazyFile, safecall
from pip._internal.commands import create_command
@@ -421,7 +421,7 @@
metadata = project_wheel_metadata(
os.path.dirname(os.path.abspath(src_file))
from pip._internal.req import InstallRequirement
from pip._internal.req.constructors import install_req_from_line
@@ -369,6 +369,6 @@ def cli(
isolated=build_isolation,
quiet=log.verbosity <= 0,
)
- except BuildBackendException as e:
+ except (BuildException,StopIteration) as e:
+ except (BuildException, StopIteration) as e:
log.error(str(e))
log.error(f"Failed to parse {os.path.abspath(src_file)}")
sys.exit(2)

File diff suppressed because it is too large Load Diff

View File

@ -28,21 +28,20 @@
let
pname = "anki";
version = "23.12.1";
rev = "1a1d4d5419c6b57ef3baf99c9d2d9cf85d36ae0a";
version = "24.04";
rev = "429bc9e14cefb597646a0e1beac6ef140f226b6f";
src = fetchFromGitHub {
owner = "ankitects";
repo = "anki";
rev = version;
hash = "sha256-K38bhfU1076PxdKJFvnFb2w6Q9Q2MUmL+j8be3RZQYk=";
hash = "sha256-H/Y6ZEJ7meprk4SWIPkoABs6AV1CzbK2l22jEnMSvyk=";
fetchSubmodules = true;
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"fsrs-0.1.0" = "sha256-KJgT01OmMbqgYFE5Fu8nblZl9rL5QVVMa2DNFsw6cdk=";
"linkcheck-0.4.1" = "sha256-S93J1cDzMlzDjcvz/WABmv8CEC6x78E+f7nzhsN7NkE=";
"percent-encoding-iri-2.2.0" = "sha256-kCBeS1PNExyJd4jWfDfctxq6iTdAq69jtxFQgCCQ8kQ=";
};
@ -51,7 +50,7 @@ let
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-tOl+gLBE6SNPQvVWT/N7RKFaaP9SnpCBJf5dq2wCPuM=";
hash = "sha256-7yBN6si1Q+xvyosP7YnOw9ZfGcLZdy5ukXXFvvI20Js=";
};
anki-build-python = python3.withPackages (ps: with ps; [
@ -155,22 +154,25 @@ python3.pkgs.buildPythonApplication {
propagatedBuildInputs = with python3.pkgs; [
# This rather long list came from running:
# grep --no-filename -oE "^[^ =]*" python/{requirements.base.txt,requirements.bundle.txt,requirements.qt6_4.txt} | \
# grep --no-filename -oE "^[^ =]*" python/{requirements.base.txt,requirements.bundle.txt,requirements.qt6_lin.txt} | \
# sort | uniq | grep -v "^#$"
# in their repo at the git tag for this version
# There's probably a more elegant way, but the above extracted all the
# names, without version numbers, of their python dependencies. The hope is
# that nixpkgs versions are "close enough"
# I then removed the ones the check phase failed on (pythonCatchConflictsPhase)
attrs
beautifulsoup4
blinker
build
certifi
charset-normalizer
click
colorama
decorator
distro
flask
flask-cors
google-api-python-client
idna
importlib-metadata
itsdangerous
@ -179,21 +181,27 @@ python3.pkgs.buildPythonApplication {
markdown
markupsafe
orjson
pep517
pyparsing
packaging
pip
pip-system-certs
pip-tools
protobuf
pyproject-hooks
pyqt6
pyqt6-sip
pyqt6-webengine
pyrsistent
pysocks
python3.pkgs.protobuf
requests
send2trash
six
setuptools
soupsieve
tomli
urllib3
waitress
werkzeug
wheel
wrapt
zipp
] ++ lib.optionals stdenv.isDarwin [
AVKit

View File

@ -1,13 +1,13 @@
diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py
index 6f28d2dd0..fcd6a5ee4 100644
index b6d24080b..5e5faac7b 100644
--- a/qt/aqt/__init__.py
+++ b/qt/aqt/__init__.py
@@ -402,12 +402,6 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None:
@@ -413,11 +413,5 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None:
# RHI errors are emitted multiple times so make sure we only handle them once
driver_failed = False
- # work around pyqt loading wrong GL library
- if is_lin:
- if is_lin and not sys.platform.startswith("freebsd"):
- import ctypes
-
- ctypes.CDLL("libGL.so.1", ctypes.RTLD_GLOBAL)
@ -15,5 +15,3 @@ index 6f28d2dd0..fcd6a5ee4 100644
# catch opengl errors
def msgHandler(category: Any, ctx: Any, msg: Any) -> None:
if category == QtMsgType.QtDebugMsg:
--
2.42.0

View File

@ -4790,6 +4790,8 @@ self: super: with self; {
gitpython = callPackage ../development/python-modules/gitpython { };
git-versioner = callPackage ../development/python-modules/git-versioner { };
glad = callPackage ../development/python-modules/glad { };
glad2 = callPackage ../development/python-modules/glad2 { };
@ -9777,6 +9779,8 @@ self: super: with self; {
pip-requirements-parser = callPackage ../development/python-modules/pip-requirements-parser { };
pip-system-certs = callPackage ../development/python-modules/pip-system-certs { };
pipx = callPackage ../development/python-modules/pipx { };
pivy = callPackage ../development/python-modules/pivy {