From 55928b136229ec811fee9c4f743464dd9ea1d2dcf3da835ed424abd57fb18260 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 12 Jun 2025 05:11:40 +0000 Subject: [PATCH] - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urlextract?expand=0&rev=18 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + python-urlextract.changes | 76 ++++++++++++++++++++++++++++++++++++ python-urlextract.spec | 81 +++++++++++++++++++++++++++++++++++++++ urlextract-1.9.0.tar.gz | 3 ++ 5 files changed, 184 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-urlextract.changes create mode 100644 python-urlextract.spec create mode 100644 urlextract-1.9.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-urlextract.changes b/python-urlextract.changes new file mode 100644 index 0000000..840aff0 --- /dev/null +++ b/python-urlextract.changes @@ -0,0 +1,76 @@ +------------------------------------------------------------------- +Thu Jun 12 05:01:37 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. + +------------------------------------------------------------------- +Mon Mar 25 09:00:45 UTC 2024 - Bernhard Wiedemann + +- Avoid modification of build results by tests + +------------------------------------------------------------------- +Tue Mar 19 13:01:45 UTC 2024 - Dirk Müller + +- update to 1.9.0: + * Adding support for Python 3.12 + * Accepting only ASCII characters left from TLD. + * Fixing parsing of Markdown links + * Fixing filter of mixed case hostnames + * updated list of TLDs + +------------------------------------------------------------------- +Wed Dec 13 10:26:02 UTC 2023 - Dirk Müller + +- update to 1.8.0: + * adding ability to filter out mixed case hostnames (issue + #143) + * adding the ability to set stop characters inside of scheme - + default stop chars ':' (issue #82) + * Fix index issue with uppercase characters in domain names + * updated GitHub Action test + +------------------------------------------------------------------- +Wed Nov 9 19:35:06 UTC 2022 - Yogalakshmi Arunachalam + +- Update to v1.7.1 + * fixes urlextract without authority causes AttributeError + +------------------------------------------------------------------- +Sat Oct 29 16:25:27 UTC 2022 - Yogalakshmi Arunachalam + +- Update to v1.7.0 + * correct handling when authority starts with @ symbol + * remove unreserved characters from the beginning of found URL + * added typing and mypy checkcs - by mimi89999 + * updated list of TLDs + +------------------------------------------------------------------- +Wed Aug 17 04:36:34 UTC 2022 - John Vandenberg + +- Update to v1.6.0 + * Add a list of URLs allowed to extract + * Updating tests with correct order of actual == expected + * Update list of TLDs +- from v1.5.0 + * Fix incorrect indices when TLD is found twice + * Replace unmaintained appdirs with maintained platformdirs + * update README, code style and code formatting using black + * updated list of TLDs +- from v1.4.0 + * urlextract detects URLs which start with double slash '//' + * adding ability to return only URLs with schema +- from v1.3.0 + * fixing None of the cache directory is writable + * fixes RE for IPv4 addresses + * updated list of TLDs + * urlextract cli is telling people to report errors on GitHub + +------------------------------------------------------------------- +Mon May 18 09:10:43 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Thu Dec 26 04:43:44 PM UTC 2019 - John Vandenberg + +- Initial spec for v0.14.0 diff --git a/python-urlextract.spec b/python-urlextract.spec new file mode 100644 index 0000000..f42775a --- /dev/null +++ b/python-urlextract.spec @@ -0,0 +1,81 @@ +# +# spec file for package python-urlextract +# +# 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/ +# + + +Name: python-urlextract +Version: 1.9.0 +Release: 0 +Summary: Collects and extracts URLs from given text +License: MIT +URL: https://github.com/lipoja/URLExtract +Source: https://github.com/lipoja/URLExtract/archive/v%{version}.tar.gz#/urlextract-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-dnspython +Requires: python-filelock +Requires: python-idna +Requires: python-platformdirs +Requires: python-uritools +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module dnspython} +BuildRequires: %{python_module filelock} +BuildRequires: %{python_module idna} +BuildRequires: %{python_module platformdirs} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module uritools} +# /SECTION +%python_subpackages + +%description +Collects and extracts URLs from given text. + +%prep +%setup -q -n URLExtract-%{version} +sed -i '1{/^#!/d}' urlextract/*.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/urlextract +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest -k 'not test_dns' +find %{buildroot} -name tlds-alpha-by-domain.txt.lock -delete # avoid modification of build results by tests + +%post +%python_install_alternative urlextract + +%postun +%python_uninstall_alternative urlextract + +%files %{python_files} +%doc CHANGELOG.rst README.rst +%license LICENSE +%python_alternative %{_bindir}/urlextract +%{python_sitelib}/urlextract +%{python_sitelib}/urlextract-%{version}.dist-info + +%changelog diff --git a/urlextract-1.9.0.tar.gz b/urlextract-1.9.0.tar.gz new file mode 100644 index 0000000..9d54a6b --- /dev/null +++ b/urlextract-1.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:686badb9599767b621456a615e96c8cb5a4d8c3c5050dbd4cc3689b531c779cf +size 35906