From 37b4ed799e8a2ff83f3e05b0a1ccac9fbea5fe8e Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 5 Sep 2024 19:56:16 -0600 Subject: [PATCH] ubuntukylin-wallpapers: fix version for PEP440 compliance. --- helpers/DATA/ubuntukylin-wallpapers/pep440.patch | 15 +++++++++++++++ helpers/make-ubuntukylin-wallpapers | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 helpers/DATA/ubuntukylin-wallpapers/pep440.patch diff --git a/helpers/DATA/ubuntukylin-wallpapers/pep440.patch b/helpers/DATA/ubuntukylin-wallpapers/pep440.patch new file mode 100644 index 0000000..33b4dd2 --- /dev/null +++ b/helpers/DATA/ubuntukylin-wallpapers/pep440.patch @@ -0,0 +1,15 @@ +diff --git a/setup.py b/setup.py +index afd2fb91..6b73c251 100644 +--- a/setup.py ++++ b/setup.py +@@ -9,8 +9,8 @@ changelog = "debian/changelog" + if os.path.exists(changelog): + head=open(changelog).readline() + match = re.compile(".*\((.*)\).*").match(head) +- if match: +- version = match.group(1) ++ version = match.group(1) ++ version = re.sub("([a-zA-Z])", r"+\1", version, count=1) + + setup( + name = 'ubuntukylin-wallpapers', diff --git a/helpers/make-ubuntukylin-wallpapers b/helpers/make-ubuntukylin-wallpapers index 3c9edc4..7e0aa6a 100644 --- a/helpers/make-ubuntukylin-wallpapers +++ b/helpers/make-ubuntukylin-wallpapers @@ -23,6 +23,9 @@ VERSION=3 . ./config +# Patch PEP440 version. +patch_p1 $DATA/pep440.patch + # Tune default background for kylin sed -i "s|background=.*|background=\"/usr/share/backgrounds/$CODENAME.jpg\"|" 30_ubuntukylin-wallpapers.gschema.override sed -i "s|picture-uri=.*|picture-uri=\'file:///usr/share/backgrounds/$CODENAME.jpg\'|" 30_ubuntukylin-wallpapers.gschema.override