From 63b9d8bfbfdf37e0afce9fb24cf9e71019b4e9af8c14c0e635ddb912cf05fad0 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 12 Jun 2025 05:10:48 +0000 Subject: [PATCH] - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Unidecode?expand=0&rev=49 --- .gitattributes | 23 ++++ .gitignore | 1 + Unidecode-1.3.8.tar.gz | 3 + Unidecode-1.4.0.tar.gz | 3 + python-Unidecode.changes | 280 +++++++++++++++++++++++++++++++++++++++ python-Unidecode.spec | 105 +++++++++++++++ 6 files changed, 415 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Unidecode-1.3.8.tar.gz create mode 100644 Unidecode-1.4.0.tar.gz create mode 100644 python-Unidecode.changes create mode 100644 python-Unidecode.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Unidecode-1.3.8.tar.gz b/Unidecode-1.3.8.tar.gz new file mode 100644 index 0000000..0b9e547 --- /dev/null +++ b/Unidecode-1.3.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4 +size 192701 diff --git a/Unidecode-1.4.0.tar.gz b/Unidecode-1.4.0.tar.gz new file mode 100644 index 0000000..1a4326c --- /dev/null +++ b/Unidecode-1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23 +size 200149 diff --git a/python-Unidecode.changes b/python-Unidecode.changes new file mode 100644 index 0000000..f37b1ca --- /dev/null +++ b/python-Unidecode.changes @@ -0,0 +1,280 @@ +------------------------------------------------------------------- +Thu Jun 12 05:01:36 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. + +------------------------------------------------------------------- +Thu Apr 24 15:43:09 UTC 2025 - Benoît Monin + +- update to version 1.4.0: + * Drop support for Python <3.7. + * Add replacements for playing card suits and chess pieces + (thanks to Alan Davidson) + * Add replacements for U+211F "RESPONSE" and 0x2123 "VERSICLE" + (thanks to @ciesiolka on GitHub) + * Fix replacement for U+1D6D5 "MATHEMATICAL BOLD SMALL TAU". + * Fix replacements for U+014A "LATIN CAPITAL LETTER ENG" + and U+014B "LATIN SMALL LETTER ENG". + * Add replacements for U+2103 "DEGREE CELSIUS" and U+2109 "DEGREE + FAHRENHEIT". + +------------------------------------------------------------------- +Sun Jan 21 18:00:33 UTC 2024 - Axel Braun + +- enable %{?sle15allpythons} + +------------------------------------------------------------------- +Thu Jan 11 21:41:15 UTC 2024 - Benoît Monin + +- update to version 1.3.8: + * Fix replacement for U+1E9E "LATIN CAPITAL LETTER SHARP S" + (thanks to Thomas Voss) + +------------------------------------------------------------------- +Tue Sep 26 18:42:26 UTC 2023 - Benoît Monin + +- update to version 1.3.7: + * Add missing replacements for katakana punctuation (thanks to + Emil Hammarberg) + * Fix replacement for U+1F19C "SQUARED SECOND SCREEN". + * Fix replacement for U+1F1A9 "SQUARED LOSSLESS". + * Add more replacements for symbols in the U+21xx and U+1F1xx + pages (thanks to @cheznewa on GitHub) + * Remove old __init__.pyi from the Wheel package that was + included due to a bug in the build script. +- remove python_module macro definition: + already provided by python-rpm-macros +- declare a more specific file list to avoid packaging unwanted + files + +------------------------------------------------------------------- +Thu Oct 27 21:24:50 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 1.3.6: + * No changes. Re-upload to PyPi. + +------------------------------------------------------------------- +Wed Sep 28 19:48:42 UTC 2022 - Benoît Monin + +- update to version 1.3.5: + * Remove trailing space in replacements for vulgar fractions + +------------------------------------------------------------------- +Thu Mar 10 17:15:24 UTC 2022 - Benoît Monin + +- update to version 1.3.4: + * Add some missing replacements for symbols in the U+21xx and + U+1F1xx pages (thanks to @cheznewa on GitHub) + +------------------------------------------------------------------- +Sat Feb 19 11:57:09 UTC 2022 - Benoît Monin + +- update to version 1.3.3: + * Command-line utility now reads input line-by-line, making + it usable with large files (thanks to Jan-Thorsten Peter) + +------------------------------------------------------------------- +Thu Nov 18 11:06:48 UTC 2021 - John Paul Adrian Glaubitz + +- update to version 1.3.2: + * Re-upload because PyPI was missing Requires-Python metadata for + the .tar.gz package. + +------------------------------------------------------------------- +Thu Sep 9 20:38:32 UTC 2021 - Benoît Monin + +- update to version 1.3.1: + * Fix issue with wheel package falsely claiming support for + Python 2. + +------------------------------------------------------------------- +Mon Sep 6 18:03:00 UTC 2021 - Benoît Monin + +- update to version 1.3.0: + * Drop support for Python <3.5. + * Improvements to Hebrew and Yiddish transliterations (thanks to + Alon Bar-Lev and @eyaler on GitHub) +- move update-alternative to postun instead of preun: + fix rpmlint warning +- disable python2 build: unsupported by upstream now + +------------------------------------------------------------------- +Fri Feb 5 17:19:37 UTC 2021 - Benoît Monin + +- update to version 1.2.0: + * Add 'errors' argument that specifies how characters with + unknown replacements are handled. Default is 'ignore' to + replicate the behavior of older versions. + * Many characters that were previously replaced with '[?]' are + now correctly marked as unknown and will behave as specified + in the new errors='...' argument. + * Added some missing ligatures and quotation marks in U+1F6xx + and U+27xx ranges. + * Add PEP 561-style type information (thanks to Pascal Corpet) + * Support for Python 2 and 3.5 to be removed in next release. + +------------------------------------------------------------------- +Mon Dec 21 17:47:10 UTC 2020 - Benoît Monin + +- update to version 1.1.2: + * Add some missing replacements in the U+23xx page. + * Fix U+204A "TIRONIAN SIGN ET" replacement. +- run the tests with pyunitest macro + +------------------------------------------------------------------- +Wed Sep 11 12:35:09 UTC 2019 - Tomáš Chvátal + +- Update to 1.1.1: + * no upstream changelog + +------------------------------------------------------------------- +Fri Jun 14 16:48:52 UTC 2019 - Benoît Monin + +- update to Unidecode 1.1.0: + * Add more Latin letter variants in U+1F1xx page + * Make it possible to use the Unidecode command-line utility via + "python -m unidecode" (thanks to Jon Dufresne) + * General clean up of code and documentation + (thanks to Jon Dufresne) + +------------------------------------------------------------------- +Thu Dec 6 14:30:29 UTC 2018 - Tomáš Chvátal + +- Run correct fdupes call + +------------------------------------------------------------------- +Tue Dec 4 12:55:35 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Mon Nov 19 19:48:35 UTC 2018 - Benoît Monin + +- update to Unidecode 1.0.23: + * Improve transliteration of Hebrew letters + (thanks to Alon Bar-Lev) + * Add transliterations for the phonetic block U+1D00 - U+1D7F + (thanks to Oscar Laurent) + * Transliterate SI "micro" prefix as "u" instead of "micro" in + the U+33xx block. + * Add U+33DE SQUARE V OVER M and U+33DF SQUARE A OVER M. + * Drop support for Python 2.6 and 3.3 (thanks to Jon Dufresne) +- spec cleanup: fix license to GPL-2.0-or-later +- mark the LICENSE file as %license instead of %doc +- add the README to the documentation + +------------------------------------------------------------------- +Sat Jan 6 21:26:05 UTC 2018 - benoit.monin@gmx.fr + +- update to Unidecode 1.0.22: + * Move to semantic version numbering, no longer following version + numbers from the original Perl module. This fixes an issue with + setuptools (>= 8) and others expecting major.minor.patch format + (https://github.com/avian2/unidecode/issues/13) + * Add transliterations for currency signs U+20B0 through U+20BF + (thanks to Mike Swanson) + * Surround transliterations of vulgar fractions with spaces to + avoid incorrect combinations with adjacent numerals + (thanks to Jeffrey Gerard) + +------------------------------------------------------------------- +Wed Jun 28 18:15:36 UTC 2017 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.21: + * Add U+2116 NUMERO SIGN (thanks to Alan Davidson) + * Add U+05BE HEBREW PUNCTUATION MAQAF (thanks to Micha Moskovic) + +------------------------------------------------------------------- +Thu Apr 6 16:10:57 UTC 2017 - alarrosa@suse.com + +- Use singlespec macros + +------------------------------------------------------------------- +Tue Jan 10 20:00:08 UTC 2017 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.20: + * Fixed transliteration of circled Latin letters and numbers + (thanks to Krzysztof Jurewicz) + * Add square unit symbols + * Add Latin variants in U+20xx and U+21xx pages + * Fix U+02B1 MODIFIER LETTER SMALL H WITH HOOK + * Fix U+205F MEDIUM MATHEMATICAL SPACE + * Add "DIGIT ... COMMA" and "PARANTHESIZED LATIN CAPITAL LETTER" + in U+1F1xx page + * Add missing vulgar fractions and a/c, a/s, c/o, c/u symbols + * Add universal Wheel release (thanks to Adam Chainz) +- change source url to pythonhosted.org + +------------------------------------------------------------------- +Fri Jan 22 19:02:19 UTC 2016 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.19: + * Add unidecode_expect_ascii() and unidecode_expect_nonascii() + functions for performance critical applications. + +------------------------------------------------------------------- +Tue Nov 10 13:26:52 UTC 2015 - mpluskal@suse.com + +- Install License and ChangeLog + +------------------------------------------------------------------- +Sun Jun 14 08:42:34 UTC 2015 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.18: + * Add a command line utility. (thanks to Andrew Udvare) + * Use setuptools for packaging. +- add new build dependency: python-setuptools +- add and use update-alternatives for unidecode binary +- set a UTF-8 locale to run the tests: they fail without it + +------------------------------------------------------------------- +Sat Dec 20 13:02:04 UTC 2014 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.17 + * Add some missing Latin letter variants used by popular "Unicode + text converter" tools. + * Issue a warning if a surrogate character is encountered in + input. + * Corrected module import which might cause unidecode() to raise + AttributeError on some systems. +- add %check section + +------------------------------------------------------------------- +Mon May 12 17:50:09 UTC 2014 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.16 + * Corrected ChangeLog. +- changes from 0.04.15 + * Fixed transliteration of Chinese character "Yi". + * Transliterate Euro sign as "EUR". + +------------------------------------------------------------------- +Fri Dec 27 17:20:40 UTC 2013 - benoit.monin@gmx.fr + +- remove useless CFLAGS="%{optflags}" + +------------------------------------------------------------------- +Fri Sep 20 20:48:57 UTC 2013 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.14 + * Revert transliteration for Latin characters with umlauts back + to language-neutral, unaccented characters. + * Added transliterations for circled numbers, letters and + ordinals. + * Minor fixes to rarely used punctuation characters. + +------------------------------------------------------------------- +Sat Jun 8 16:54:21 UTC 2013 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.13 + +------------------------------------------------------------------- +Thu Mar 28 19:57:11 UTC 2013 - benoit.monin@gmx.fr + +- call fdupes to fix a warning from rpmlint + +------------------------------------------------------------------- +Wed Mar 27 20:28:53 UTC 2013 - benoit.monin@gmx.fr + +- initial package with version 0.04.12 + diff --git a/python-Unidecode.spec b/python-Unidecode.spec new file mode 100644 index 0000000..59e7d19 --- /dev/null +++ b/python-Unidecode.spec @@ -0,0 +1,105 @@ +# +# spec file for package python-Unidecode +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15allpythons} +%define skip_python2 1 +Name: python-Unidecode +Version: 1.4.0 +Release: 0 +Summary: ASCII transliterations of Unicode text +License: GPL-2.0-or-later +URL: https://pypi.python.org/pypi/Unidecode +Source: https://files.pythonhosted.org/packages/source/U/Unidecode/Unidecode-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +It often happens that you have text data in Unicode, but you need to +represent it in ASCII. For example when integrating with legacy code that +doesn't support Unicode, or for ease of entry of non-Roman names on a US +keyboard, or when constructing ASCII machine identifiers from +human-readable Unicode strings that should still be somewhat intelligible +(a popular example of this is when making an URL slug from an article +title). + +In most of these examples you could represent Unicode characters as +"???" or "\\15BA\\15A0\\1610", to mention two extreme cases. But that's +nearly useless to someone who actually wants to read what the text says. + +What Unidecode provides is a middle road: function unidecode() takes +Unicode data and tries to represent it in ASCII characters (i.e., the +universally displayable characters between 0x00 and 0x7F), where the +compromises taken when mapping between two character sets are chosen to be +near what a human with a US keyboard would choose. + +The quality of resulting ASCII representation varies. For languages of +western origin it should be between perfect and good. On the other hand +transliteration (i.e., conveying, in Roman letters, the pronunciation +expressed by the text in some other writing system) of languages like +Chinese, Japanese or Korean is a very complex issue and this library does +not even attempt to address it. It draws the line at context-free +character-by-character mapping. So a good rule of thumb is that the further +the script you are transliterating is from Latin alphabet, the worse the +transliteration will be. + +Note that this module generally produces better results than simply +stripping accents from characters (which can be done in Python with +built-in functions). It is based on hand-tuned character mappings that for +example also contain ASCII approximations for symbols and non-Latin +alphabets. + +This is a Python port of Text::Unidecode Perl module by +Sean M. Burke . + +%prep +%setup -q -n Unidecode-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%python_clone -a %{buildroot}%{_bindir}/unidecode + +%check +export LANG=en_US.UTF-8 +%pyunittest -v + +%post +%python_install_alternative unidecode + +%postun +%python_uninstall_alternative unidecode + +%files %{python_files} +%license LICENSE +%doc ChangeLog README.rst +%{python_sitelib}/[Uu]nidecode-%{version}.dist-info +%{python_sitelib}/unidecode +%python_alternative %{_bindir}/unidecode + +%changelog