summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-03-09 17:33:02 +0000
committerCoprDistGit <infra@openeuler.org>2023-03-09 17:33:02 +0000
commit892e119a04eea0483eb8c3db189a5ab6298e2a4d (patch)
treeb9735a74b4fcca334d9220ab2da7eb1a324f78dd
parent0e9134bd61ba8ff26acf3973f63166a8afa748f7 (diff)
automatic import of python-tldextract
-rw-r--r--.gitignore1
-rw-r--r--python-tldextract.spec151
-rw-r--r--sources1
3 files changed, 153 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..1e5966c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/tldextract-3.4.0.tar.gz
diff --git a/python-tldextract.spec b/python-tldextract.spec
new file mode 100644
index 0000000..78a6fa5
--- /dev/null
+++ b/python-tldextract.spec
@@ -0,0 +1,151 @@
+%global _empty_manifest_terminate_build 0
+Name: python-tldextract
+Version: 3.4.0
+Release: 1
+Summary: Accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL). By default, this includes the public ICANN TLDs and their exceptions. You can optionally support the Public Suffix List's private domains as well.
+License: BSD License
+URL: https://github.com/john-kurkowski/tldextract
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9f/67/9442fd49ac0d234933c9c90cb2e2f072d9df021577547c09456dd4484ed4/tldextract-3.4.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-idna
+Requires: python3-requests
+Requires: python3-requests-file
+Requires: python3-filelock
+
+%description
+ `tldextract` accurately separates a URL's subdomain, domain, and public suffix,
+using the Public Suffix List (PSL).
+
+ >>> import tldextract
+ >>> tldextract.extract('http://forums.news.cnn.com/')
+ ExtractResult(subdomain='forums.news', domain='cnn', suffix='com')
+ >>> tldextract.extract('http://forums.bbc.co.uk/') # United Kingdom
+ ExtractResult(subdomain='forums', domain='bbc', suffix='co.uk')
+ >>> tldextract.extract('http://www.worldbank.org.kg/') # Kyrgyzstan
+ ExtractResult(subdomain='www', domain='worldbank', suffix='org.kg')
+
+`ExtractResult` is a namedtuple, so it's simple to access the parts you want.
+
+ >>> ext = tldextract.extract('http://forums.bbc.co.uk')
+ >>> (ext.subdomain, ext.domain, ext.suffix)
+ ('forums', 'bbc', 'co.uk')
+ >>> # rejoin subdomain and domain
+ >>> '.'.join(ext[:2])
+ 'forums.bbc'
+ >>> # a common alias
+ >>> ext.registered_domain
+ 'bbc.co.uk'
+
+By default, this package supports the public ICANN TLDs and their exceptions.
+You can optionally support the Public Suffix List's private domains as well.
+
+
+%package -n python3-tldextract
+Summary: Accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL). By default, this includes the public ICANN TLDs and their exceptions. You can optionally support the Public Suffix List's private domains as well.
+Provides: python-tldextract
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-tldextract
+ `tldextract` accurately separates a URL's subdomain, domain, and public suffix,
+using the Public Suffix List (PSL).
+
+ >>> import tldextract
+ >>> tldextract.extract('http://forums.news.cnn.com/')
+ ExtractResult(subdomain='forums.news', domain='cnn', suffix='com')
+ >>> tldextract.extract('http://forums.bbc.co.uk/') # United Kingdom
+ ExtractResult(subdomain='forums', domain='bbc', suffix='co.uk')
+ >>> tldextract.extract('http://www.worldbank.org.kg/') # Kyrgyzstan
+ ExtractResult(subdomain='www', domain='worldbank', suffix='org.kg')
+
+`ExtractResult` is a namedtuple, so it's simple to access the parts you want.
+
+ >>> ext = tldextract.extract('http://forums.bbc.co.uk')
+ >>> (ext.subdomain, ext.domain, ext.suffix)
+ ('forums', 'bbc', 'co.uk')
+ >>> # rejoin subdomain and domain
+ >>> '.'.join(ext[:2])
+ 'forums.bbc'
+ >>> # a common alias
+ >>> ext.registered_domain
+ 'bbc.co.uk'
+
+By default, this package supports the public ICANN TLDs and their exceptions.
+You can optionally support the Public Suffix List's private domains as well.
+
+
+%package help
+Summary: Development documents and examples for tldextract
+Provides: python3-tldextract-doc
+%description help
+ `tldextract` accurately separates a URL's subdomain, domain, and public suffix,
+using the Public Suffix List (PSL).
+
+ >>> import tldextract
+ >>> tldextract.extract('http://forums.news.cnn.com/')
+ ExtractResult(subdomain='forums.news', domain='cnn', suffix='com')
+ >>> tldextract.extract('http://forums.bbc.co.uk/') # United Kingdom
+ ExtractResult(subdomain='forums', domain='bbc', suffix='co.uk')
+ >>> tldextract.extract('http://www.worldbank.org.kg/') # Kyrgyzstan
+ ExtractResult(subdomain='www', domain='worldbank', suffix='org.kg')
+
+`ExtractResult` is a namedtuple, so it's simple to access the parts you want.
+
+ >>> ext = tldextract.extract('http://forums.bbc.co.uk')
+ >>> (ext.subdomain, ext.domain, ext.suffix)
+ ('forums', 'bbc', 'co.uk')
+ >>> # rejoin subdomain and domain
+ >>> '.'.join(ext[:2])
+ 'forums.bbc'
+ >>> # a common alias
+ >>> ext.registered_domain
+ 'bbc.co.uk'
+
+By default, this package supports the public ICANN TLDs and their exceptions.
+You can optionally support the Public Suffix List's private domains as well.
+
+
+%prep
+%autosetup -n tldextract-3.4.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-tldextract -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 3.4.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..313e7fe
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+a58a876f4c3262a6a526a43ec115d629 tldextract-3.4.0.tar.gz