mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/mkdocs-material: Remove unnecessary backrefs dep
Closes: https://bugs.gentoo.org/950661 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
From 13f768034e0935738c7f4d2562d46030bd9b9758 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Wed, 5 Mar 2025 20:37:47 +0100
|
||||
Subject: [PATCH] Import backrefs only when actually used
|
||||
|
||||
---
|
||||
material/plugins/search/plugin.py | 3 ++-
|
||||
src/plugins/search/plugin.py | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/material/plugins/search/plugin.py b/material/plugins/search/plugin.py
|
||||
index ce23c15cb..2bc411c5d 100644
|
||||
--- a/material/plugins/search/plugin.py
|
||||
+++ b/material/plugins/search/plugin.py
|
||||
@@ -22,7 +22,6 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
-from backrefs import bre
|
||||
|
||||
from html import escape
|
||||
from html.parser import HTMLParser
|
||||
@@ -286,6 +285,8 @@ class SearchIndex:
|
||||
|
||||
# Find and segment Chinese characters in string
|
||||
def _segment_chinese(self, data):
|
||||
+ from backrefs import bre
|
||||
+
|
||||
expr = bre.compile(r"(\p{script: Han}+)", bre.UNICODE)
|
||||
|
||||
# Replace callback
|
||||
diff --git a/src/plugins/search/plugin.py b/src/plugins/search/plugin.py
|
||||
index ce23c15cb..2bc411c5d 100644
|
||||
--- a/src/plugins/search/plugin.py
|
||||
+++ b/src/plugins/search/plugin.py
|
||||
@@ -22,7 +22,6 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
-from backrefs import bre
|
||||
|
||||
from html import escape
|
||||
from html.parser import HTMLParser
|
||||
@@ -286,6 +285,8 @@ class SearchIndex:
|
||||
|
||||
# Find and segment Chinese characters in string
|
||||
def _segment_chinese(self, data):
|
||||
+ from backrefs import bre
|
||||
+
|
||||
expr = bre.compile(r"(\p{script: Han}+)", bre.UNICODE)
|
||||
|
||||
# Replace callback
|
||||
@@ -61,6 +61,8 @@ PDEPEND="
|
||||
PATCHES=(
|
||||
# simplify pyproject to remove extra deps for metadata
|
||||
"${FILESDIR}/${PN}-8.5.7-simplify-build.patch"
|
||||
# import backrefs only when used (i.e. never)
|
||||
"${FILESDIR}/${PN}-9.6.7-backrefs.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
Reference in New Issue
Block a user