Date: Tuesday, April 11, 2023 @ 16:54:59
Author: arojas
Revision: 1444703
archrelease: copy trunk to community-staging-x86_64
Added:
displaycal/repos/community-staging-x86_64/
displaycal/repos/community-staging-x86_64/3762e7be.patch
(from rev 1444702, displaycal/trunk/3762e7be.patch)
displaycal/repos/community-staging-x86_64/PKGBUILD
(from rev 1444702, displaycal/trunk/PKGBUILD)
----------------+
3762e7be.patch | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 44 ++++++++++++++++++++++++++++++
2 files changed, 124 insertions(+)
Copied: displaycal/repos/community-staging-x86_64/3762e7be.patch (from rev
1444702, displaycal/trunk/3762e7be.patch)
===================================================================
--- community-staging-x86_64/3762e7be.patch (rev 0)
+++ community-staging-x86_64/3762e7be.patch 2023-04-11 16:54:59 UTC (rev
1444703)
@@ -0,0 +1,80 @@
+From 3762e7be0368484d68c4a90923672fdb0f51a5fc Mon Sep 17 00:00:00 2001
+From: Patrick Zwerschke <[email protected]>
+Date: Tue, 6 Dec 2022 03:41:27 +0100
+Subject: [PATCH] Update test workflow for python 3.11 (#215)
+
+- added python 3.11 to test workflow
+- catch FileNotFoundError in module defaultpaths
+---
+ .github/workflows/pytest.yml | 10 +++++++---
+ DisplayCAL/RealDisplaySizeMM.py | 2 ++
+ DisplayCAL/defaultpaths.py | 17 +++++++++--------
+ DisplayCAL/lib64/python311/__init__.py | 0
+ README.md | 2 +-
+ 5 files changed, 19 insertions(+), 12 deletions(-)
+ create mode 100644 DisplayCAL/lib64/python311/__init__.py
+
+diff --git a/DisplayCAL/RealDisplaySizeMM.py b/DisplayCAL/RealDisplaySizeMM.py
+index 00957692c..25b730d05 100644
+--- a/DisplayCAL/RealDisplaySizeMM.py
++++ b/DisplayCAL/RealDisplaySizeMM.py
+@@ -25,6 +25,8 @@
+ from DisplayCAL.lib64.python39.RealDisplaySizeMM import *
+ elif sys.version_info[:2] == (3, 10):
+ from DisplayCAL.lib64.python310.RealDisplaySizeMM import *
++ elif sys.version_info[:2] == (3, 11):
++ from DisplayCAL.lib64.python311.RealDisplaySizeMM import *
+ # else:
+ # pass
+
+diff --git a/DisplayCAL/defaultpaths.py b/DisplayCAL/defaultpaths.py
+index cd11d6d75..59258e79d 100644
+--- a/DisplayCAL/defaultpaths.py
++++ b/DisplayCAL/defaultpaths.py
+@@ -235,9 +235,14 @@ def set_translation(obj):
+ obj.GETTEXT_PACKAGE, locale_dir, codeset="UTF-8"
+ )
+ except TypeError:
+- obj.translation = gettext.translation(
+- obj.GETTEXT_PACKAGE, locale_dir
+- )
++ try:
++ obj.translation = gettext.translation(
++ obj.GETTEXT_PACKAGE, locale_dir
++ )
++ except FileNotFoundError as exc:
++ print("XDG:", exc)
++ obj.translation = gettext.NullTranslations()
++ return False
+ except IOError as exception:
+ print("XDG:", exception)
+ obj.translation = gettext.NullTranslations()
+@@ -261,11 +266,7 @@ def get_config_files(filename):
+
+ @staticmethod
+ def shell_unescape(s):
+- a = []
+- for i, c in enumerate(s):
+- if c == "\\" and len(s) > i + 1:
+- continue
+- a.append(c)
++ a = [c for i, c in enumerate(s) if c != "\\" or len(s) <= i + 1]
+ return "".join(a)
+
+ @staticmethod
+diff --git a/DisplayCAL/lib64/python311/__init__.py
b/DisplayCAL/lib64/python311/__init__.py
+new file mode 100644
+index 000000000..e69de29bb
+diff --git a/README.md b/README.md
+index 3ff3c4ec4..4119ace70 100644
+--- a/README.md
++++ b/README.md
+@@ -25,7 +25,7 @@ Here is a screenshots showing the tool working with Python
3.10:
+
+

+
+-Currently, DisplayCAL is working with Python 3.8, 3.9 and 3.10 and wxPython
4.1.1 or 4.2.0.
++Currently, DisplayCAL is working with Python 3.8, 3.9, 3.10 and 3.11 and
wxPython 4.1.1 or 4.2.0.
+
+ Here is a list of things that is working:
+
Copied: displaycal/repos/community-staging-x86_64/PKGBUILD (from rev 1444702,
displaycal/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-11 16:54:59 UTC (rev 1444703)
@@ -0,0 +1,44 @@
+# Maintainer: Bruno Pagani <[email protected]>
+# Contributor: Timothy Redaelli <[email protected]>
+# Contributor: Cedric Girard <[email protected]>
+# Contributor: foxbunny <[email protected]>
+
+_pkgname=DisplayCAL
+pkgname=displaycal
+pkgver=3.9.10
+pkgrel=2
+pkgdesc="Open Source Display Calibration and Characterization powered by
Argyll CMS (Formerly known as dispcalGUI)"
+arch=(x86_64)
+url="https://github.com/eoyilmaz/displaycal-py3"
+license=(GPL3)
+depends=(argyllcms dbus dbus-python glib2 python-certifi python-distro
+ python-numpy python-pillow python-send2trash python-wxpython
+ python-zeroconf)
+makedepends=(libxrandr libxxf86vm python-build python-installer
+ python-setuptools python-wheel)
+optdepends=('gnome-color-manager: profile installation for GNOME'
+ 'colord-kde: profile installation for KDE Plasma')
+source=(${url}/releases/download/${pkgver}/${_pkgname}-${pkgver}.tar.gz
+ 3762e7be.patch)
+sha256sums=('a031c355bd33b800b8f723df98d7bbc6e14a680d414591abef95f0b0baae807b'
+ 'a392f409342e7eb7892f0341c550fd26a8a8e65672ed1f039adbf6f524ebd701')
+
+prepare() {
+ cd ${_pkgname}-${pkgver}
+ patch -p1 -i ../3762e7be.patch # Fix build with Python 3.11
+}
+
+build() {
+ cd ${_pkgname}-${pkgver}
+ python -m build --wheel --no-isolation
+}
+
+package() {
+ cd ${_pkgname}-${pkgver}
+ python -m installer --destdir="${pkgdir}" dist/*.whl
+ # https://github.com/eoyilmaz/displaycal-py3/issues/117
+ install -d "${pkgdir}"/etc/xdg/autostart
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+ mv
"${pkgdir}"/{$site_packages/build/.config,etc/xdg}/autostart/z-displaycal-apply-profiles.desktop
+ rmdir "${pkgdir}"/$site_packages/build/{.config{/autostart,},}
+}