diff --git a/emoji-1.2.0.tar.gz b/emoji-1.2.0.tar.gz deleted file mode 100644 index 020537d..0000000 --- a/emoji-1.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:496f432058567985838c13d67dde84ca081614a8286c0b9cdc7d63dfa89d51a3 -size 131476 diff --git a/emoji-1.4.2.tar.gz b/emoji-1.4.2.tar.gz new file mode 100644 index 0000000..7649149 --- /dev/null +++ b/emoji-1.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21257f311e24468031e85685867c00b87249dc7612b82dc763a771ba5fb00c01 +size 184985 diff --git a/fix-python2.patch b/fix-python2.patch new file mode 100644 index 0000000..9ddb72d --- /dev/null +++ b/fix-python2.patch @@ -0,0 +1,22 @@ +From: Matthias Bach +Date: 2021-07-31 11:57:53 2021 +0200 +Subject: Fix matching of non-ASCII emoji names on Python 2 +References: https://github.com/carpedm20/emoji/pull/181 +Upstream: merged + +A fix to get the tests passing for the French language in 1.4.1 sadly was incomplete and only worked for Python 3. This extends the patch to also work on Python 2. + + +diff --git a/emoji/core.py b/emoji/core.py +index 7221937..ade232e 100644 +--- a/emoji/core.py ++++ b/emoji/core.py +@@ -55,7 +55,7 @@ def emojize( + Python is fun ❤️ #red heart, not black heart + """ + EMOJI_UNICODE = unicode_codes.EMOJI_UNICODE[language] +- pattern = re.compile(u'(%s[\\w\\-&.’”“()!#*+?–,/]+%s)' % delimiters) ++ pattern = re.compile(u'(%s[\\w\\-&.’”“()!#*+?–,/]+%s)' % delimiters, flags=re.UNICODE) + + def replace(match): + mg = match.group(1).replace(delimiters[0], _DEFAULT_DELIMITER).replace( diff --git a/python-emoji.changes b/python-emoji.changes index e314bfe..dcd5b63 100644 --- a/python-emoji.changes +++ b/python-emoji.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 4 19:23:18 UTC 2021 - Matthias Bach - 1.4.2 + +- Update to 1.4.2 + * Added support for German naming of emojis. + * Added support for French naming of emojis. + * Added new function `replace_emoji` which strips emojis from + output. +- Add patch `fix-python2.patch`: Fixes unicode emoji names on Python + 2. + ------------------------------------------------------------------- Wed Jan 27 19:45:51 UTC 2021 - Matthias Bach - 1.2.0 diff --git a/python-emoji.spec b/python-emoji.spec index 8e73d91..a4cc4df 100644 --- a/python-emoji.spec +++ b/python-emoji.spec @@ -18,14 +18,14 @@ Name: python-emoji -Version: 1.2.0 +Version: 1.4.2 Release: 0 Summary: Emoji for Python License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/carpedm20/emoji/ Source: https://files.pythonhosted.org/packages/source/e/emoji/emoji-%{version}.tar.gz -# https://github.com/carpedm20/emoji/pull/118 +Patch1: fix-python2.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -47,7 +47,7 @@ Python is 👍 By default, the language is English (``language='en'``) but Spanish (``'es'``), Portuguese (``'pt'``) and Italian (``'it'``) are also supported. %prep -%setup -q -n emoji-%{version} +%autosetup -n emoji-%{version} -p1 %build %python_build