From c6a7a80ab4ac49dd62647fffbee047d47d6a86540510aacbc567fe50bbaa3797 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 4 Jun 2025 06:20:37 +0000 Subject: [PATCH] - Switch to pyproject macros. - No more greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-topy?expand=0&rev=12 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + python-topy.changes | 47 ++++++++++++++++++++++++++++ python-topy.spec | 76 +++++++++++++++++++++++++++++++++++++++++++++ topy-1.1.0.tar.gz | 3 ++ 5 files changed, 150 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-topy.changes create mode 100644 python-topy.spec create mode 100644 topy-1.1.0.tar.gz 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/python-topy.changes b/python-topy.changes new file mode 100644 index 0000000..762869b --- /dev/null +++ b/python-topy.changes @@ -0,0 +1,47 @@ +------------------------------------------------------------------- +Wed Jun 4 06:13:06 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. +- No more greedy globs in %files. + +------------------------------------------------------------------- +Fri Feb 19 15:29:48 UTC 2021 - andy great + +- Update to version 1.1.0. + * Added colors to output. + +------------------------------------------------------------------- +Wed Jan 13 13:46:10 UTC 2021 - pgajdos@suse.com + +- version update to 1.0.0 + * Updated bundled ruleset from Wikipedia (#23) + * Removed Python 2.x and <3.5 compatibility code (#22) + * Fixed Travis CI configuration (#21) + * Updated bundled ruleset (thanks to Oscar Caballero) + * Added --disable option to disable individual rules (thanks to Oscar Caballero) + * Fixed behavior when replacement string contains $ symbol (thanks to Oscar Caballero) + * Prefer the faster lxml parser when it is installed. lxml is now an optional dependency + * (thanks to Oscar Caballero) + * Added Python 3.7 support, deprecated Python 3.3 and 3.4. +- python3 only package +- use %pytest macro + +------------------------------------------------------------------- +Mon May 18 09:10:33 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Sat Mar 16 17:01:42 UTC 2019 - Jan Engelhardt + +- Use noun phrase for descriptions. + +------------------------------------------------------------------- +Wed Mar 6 08:47:04 UTC 2019 - Tomáš Chvátal + +- Alter sources in %prep phase not in %install phase + +------------------------------------------------------------------- +Tue Mar 5 05:05:46 PM UTC 2019 - John Vandenberg + +- Initial spec for v0.2.2 diff --git a/python-topy.spec b/python-topy.spec new file mode 100644 index 0000000..d4cda4e --- /dev/null +++ b/python-topy.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-topy +# +# 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/ +# + + +%define skip_python2 1 +Name: python-topy +Version: 1.1.0 +Release: 0 +Summary: Tool for fixing typos in text using regular expressions +License: CC-BY-SA-4.0 AND MIT +Group: Development/Languages/Python +URL: https://github.com/intgr/topy +Source: https://github.com/intgr/topy/archive/%{version}.tar.gz#/topy-%{version}.tar.gz +BuildRequires: %{python_module beautifulsoup4} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module regex >= 2016.07.14} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-beautifulsoup4 +Requires: python-regex >= 2016.07.14 +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +A tool for fixing typos in text using regular expressions, +based on RegExTypoFix from Wikipedia. + +%prep +%setup -q -n topy-%{version} +sed -i '1 { /^#!/ d }' topy/topy.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/topy +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export LANG=en_US.UTF-8 +%pytest + +%post +%python_install_alternative topy + +%postun +%python_uninstall_alternative topy + +%files %{python_files} +%doc README.rst +%license LICENSE.txt +%python_alternative %{_bindir}/topy +%{python_sitelib}/topy +%{python_sitelib}/topy-%{version}.dist-info + +%changelog diff --git a/topy-1.1.0.tar.gz b/topy-1.1.0.tar.gz new file mode 100644 index 0000000..315e70b --- /dev/null +++ b/topy-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1aecba1aa4d06d53d8307f55ffeb41b4253ce95ade35c1a6a67188c576abd6d7 +size 140790