diff --git a/fix-setup-test.patch b/fix-setup-test.patch new file mode 100644 index 0000000..6a074d8 --- /dev/null +++ b/fix-setup-test.patch @@ -0,0 +1,22 @@ +From f34261e913c15391e8f48f90938a5164b69537b9 Mon Sep 17 00:00:00 2001 +From: Sebastian Wagner +Date: Fri, 6 Jul 2018 23:04:14 +0200 +Subject: [PATCH] setup.py: fix test suite specifier + +filenames are not supported. one must use the module name inside the package +--- + CHANGELOG.rst | 1 + + setup.py | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 0931c07..32bff73 100644 +--- a/setup.py ++++ b/setup.py +@@ -52,5 +52,5 @@ + install_requires=[ + 'six>=1.9' + ], +- test_suite='src/tld/tests.py', ++ test_suite='tld.tests', + ) diff --git a/python-tld.changes b/python-tld.changes index c7e9d9d..3f99459 100644 --- a/python-tld.changes +++ b/python-tld.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Jul 6 20:58:36 UTC 2018 - sebix+novell.com@sebix.at + +- add remove-download-test.patch to remove download test requiring internet +- add fix-setup-test.patch to fix setup.py test_suite specifier +- update to version 0.8: + - This release contains backward incompatible changes. You should update + your code. + Old `get_tld` functionality remain is moved to `get_fld` (first-level + domain definition). The `as_object` argument (False by default) has been + deprecated for `get_fld`. + Have a look at the packages' documentation and changelog for details and examples. + - Move to a Trie to match TLDs. This brings a speed up of 15-20%. + - It's now possible to search in public, private or all suffixes (old + behaviour). Use `search_public` and `search_private` arguments accordingly. + By default (to support old behavior), both are set to True. + - Correct TLD definitions. + - Domains like `*****.xn--fiqs8s` are now recognized as well. + - Due to usage of `urlsplit` instead of `urlparse`, the initial list of TLDs + is assembled quicker (a speed-up of 15-20%). + - Docs/ directory is included in source distribution tarball. + ------------------------------------------------------------------- Sat Apr 7 19:13:40 UTC 2018 - sebix+novell.com@sebix.at diff --git a/python-tld.spec b/python-tld.spec index dcce278..4bb409d 100644 --- a/python-tld.spec +++ b/python-tld.spec @@ -18,13 +18,17 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-tld -Version: 0.7.10 +Version: 0.8 Release: 0 Summary: Extract the top level domain (TLD) from the URL given License: MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-only Group: Development/Languages/Python Url: https://github.com/barseghyanartur/tld Source: https://files.pythonhosted.org/packages/source/t/tld/tld-%{version}.tar.gz +# PATCH-FIX-OPENSUSE remove-download-test.patch +Patch0: remove-download-test.patch +# PATCH-FIX-UPSTREAM fix-setup-test.patch -- based on https://github.com/barseghyanartur/tld/commit/f34261e913c15391e8f48f90938a5164b69537b9.patch +Patch1: fix-setup-test.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros @@ -39,12 +43,14 @@ BuildArch: noarch %description Extract the top level domain (TLD) from the URL given. List of TLD names is -taken from Mozilla - +taken from Mozillas public suffix list: + %prep %setup -q -n tld-%{version} sed -i '1s/^#!.*/#!\/usr\/bin\/python3/' src/tld/bin/update-tld-names +%patch0 -p1 +%patch1 -p1 %build %python_build diff --git a/remove-download-test.patch b/remove-download-test.patch new file mode 100644 index 0000000..1aeac24 --- /dev/null +++ b/remove-download-test.patch @@ -0,0 +1,16 @@ +--- tld-0.8/src/tld/tests1.py 2018-07-07 10:19:47.235166666 +0200 ++++ tld-0.8/src/tld/tests.py 2018-07-07 10:20:05.779258621 +0200 +@@ -266,13 +266,6 @@ + return res + + @log_info +- def test_1_update_tld_names(self): +- """Test updating the tld names (re-fetch mozilla source).""" +- res = update_tld_names(fail_silently=True) +- self.assertTrue(res) +- return res +- +- @log_info + def test_2_fld_good_patterns_pass(self): + """Test good URL patterns.""" + res = [] diff --git a/tld-0.7.10.tar.gz b/tld-0.7.10.tar.gz deleted file mode 100644 index f78bb6c..0000000 --- a/tld-0.7.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:123689d42438ebcbe6ea11145fe0f9ed16ffea5dc1c013409d1b15f7cfea4093 -size 228562 diff --git a/tld-0.8.tar.gz b/tld-0.8.tar.gz new file mode 100644 index 0000000..b1a3648 --- /dev/null +++ b/tld-0.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eba6e0ee3267d4249348bc0853ddc7c79402f09ab53bce88b1db6f5b4699e209 +size 105447