guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.
commit 7b5a60e084402d57ec784c96823dcd16d4cd60a0
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Tue Jul 28 09:19:15 2026 +0200
gnu: Add python-youseedee.
* gnu/packages/patches/python-youseedee-support-fallback-path.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/fontutils.scm (python-youseedee): New variable.
---
gnu/local.mk | 1 +
gnu/packages/fontutils.scm | 41 +++++++++++++++
.../python-youseedee-support-fallback-path.patch | 61 ++++++++++++++++++++++
3 files changed, 103 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 69b36bc4453..ddc5df9afee 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2365,6 +2365,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-vega-datasets-remove-la-riots-code.patch \
%D%/packages/patches/python-versioneer-guix-support.patch \
%D%/packages/patches/python-werkzeug-tests.patch \
+ %D%/packages/patches/python-youseedee-support-fallback-path.patch
\
%D%/packages/patches/qdigidoc-bundle-config-files.patch \
%D%/packages/patches/qdigidoc-bundle-tsl-files.patch \
%D%/packages/patches/qdigidoc-fix-icon.patch \
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index e10a6d74fa5..524b4c7ea05 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -75,6 +75,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages sqlite)
@@ -2058,6 +2059,46 @@ other support classes. Where useful and possible,
ufoLib2 tries to be
API-compatible with defcon.")
(license license:asl2.0)))
+(define-public python-youseedee
+ (package
+ (name "python-youseedee")
+ (version "0.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/simoncozens/youseedee")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0y246b5b2k6n9z0mh63jn6bfl8h94pszyajcc4j92v6f8wbxn2wx"))
+ (patches
+ (search-patches "python-youseedee-support-fallback-path.patch"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f ; no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-fallback-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "lib/youseedee/__init__.py"
+ (("fallback_path = .*")
+ (string-append "fallback_path = Path(\""
+ (search-input-directory inputs
+ "share/ucd")
+ "\")"))))))))
+ (inputs (list ucd))
+ (propagated-inputs (list python-filelock
+ python-platformdirs
+ python-requests))
+ (native-inputs (list python-setuptools python-setuptools-scm))
+ (home-page "https://github.com/simoncozens/youseedee")
+ (synopsis "Interface to the Unicode Character Database")
+ (description
+ "This package provides a Python interface to the latest version of the
+Unicode Character Database.")
+ (license license:asl2.0)))
+
;;; A variant used to break a cycle between python-fontpens and
;;; python-fontparts.
(define-public python-defcon-bootstrap
diff --git a/gnu/packages/patches/python-youseedee-support-fallback-path.patch
b/gnu/packages/patches/python-youseedee-support-fallback-path.patch
new file mode 100644
index 00000000000..3246c973a2f
--- /dev/null
+++ b/gnu/packages/patches/python-youseedee-support-fallback-path.patch
@@ -0,0 +1,61 @@
+From c319459137c45a52a9f9f7c766886ce8032aab7d Mon Sep 17 00:00:00 2001
+From: Liliana Marie Prikler <[email protected]>
+Date: Sat, 3 Oct 2026 09:04:01 +0200
+Subject: [PATCH] youseedee: Support fallback_path.
+
+Upstream-Status: Not submitted
+---
+ lib/youseedee/__init__.py | 17 ++++++++++++++---
+ lib/youseedee/__main__.py | 2 +-
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/lib/youseedee/__init__.py b/lib/youseedee/__init__.py
+index 5e73ef8..ee2e556 100644
+--- a/lib/youseedee/__init__.py
++++ b/lib/youseedee/__init__.py
+@@ -34,15 +34,27 @@ def bisect_key(haystack, needle, key):
+
+
+ UCD_URL = "https://unicode.org/Public/UCD/latest/ucd/UCD.zip"
++fallback_path = None # Note: allow distro customization
+
+
+-def ucd_dir():
++def ucd_dir(force_cache=False):
+ """Return the directory where Unicode data is stored"""
+- return Path(platformdirs.user_cache_dir("youseedee", ensure_exists=True))
++ if force_cache:
++ return Path(platformdirs.user_cache_dir("youseedee",
ensure_exists=True))
++ else:
++ path = Path(platformdirs.user_cache_dir("youseedee"))
++ if path.exists():
++ return path
++ elif fallback_path is not None and fallback_path.exists():
++ return fallback_path
++ else:
++ return ucd_dir(force_cache=True)
+
+
+ def ensure_files():
+ """Ensure the Unicode data files are downloaded and up to date, and
download them if not"""
++ if ucd_dir() is fallback_path:
++ return
+ file_lock = FileLock(ucd_dir() / ".youseedee_ensure_files.lock")
+ with file_lock:
+ if not (ucd_dir() / "UnicodeData.txt").is_file():
+diff --git a/lib/youseedee/__main__.py b/lib/youseedee/__main__.py
+index e1895ed..a756367 100644
+--- a/lib/youseedee/__main__.py
++++ b/lib/youseedee/__main__.py
+@@ -20,7 +20,7 @@ def main(args=None):
+
+ args = parser.parse_args(args)
+ if args.force_download:
+- file_lock = FileLock(ucd_dir() / ".youseedee_ensure_files.lock")
++ file_lock = FileLock(ucd_dir(force_cache=True) /
".youseedee_ensure_files.lock")
+ with file_lock:
+ _download_files()
+ char = sys.argv[1]
+--
+2.54.0
+