summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 06:07:50 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 06:07:50 +0000
commitf00ef8820adc532a308bc010e1bf21cffe3fea02 (patch)
tree5bdb0e31418dacd0f33947360f78ee8569a405b2
parent679df678bf6be2178b04b9cb323a3a8986f0a38d (diff)
automatic import of python-wikidata
-rw-r--r--.gitignore1
-rw-r--r--python-wikidata.spec117
-rw-r--r--sources1
3 files changed, 119 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..175df10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Wikidata-0.7.0.tar.gz
diff --git a/python-wikidata.spec b/python-wikidata.spec
new file mode 100644
index 0000000..335dac5
--- /dev/null
+++ b/python-wikidata.spec
@@ -0,0 +1,117 @@
+%global _empty_manifest_terminate_build 0
+Name: python-Wikidata
+Version: 0.7.0
+Release: 1
+Summary: Wikidata client library
+License: GPLv3 or later
+URL: https://github.com/dahlia/wikidata
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f5/5e/cbaa3824308404281cb225eebc703527e2b4b8048b9f41ab799be4a3ca5f/Wikidata-0.7.0.tar.gz
+BuildArch: noarch
+
+
+%description
+This package provides easy APIs to use Wikidata_ for Python.
+>>> from wikidata.client import Client
+>>> client = Client() # doctest: +SKIP
+>>> entity = client.get('Q20145', load=True)
+>>> entity
+<wikidata.entity.Entity Q20145 'IU'>
+>>> entity.description
+m'South Korean singer and actress'
+>>> image_prop = client.get('P18')
+>>> image = entity[image_prop]
+>>> image
+<wikidata.commonsmedia.File 'File:KBS "The Producers" press conference, 11 May 2015 10.jpg'>
+>>> image.image_resolution
+(820, 1122)
+>>> image.image_url
+'https://upload.wikimedia.org/wikipedia/commons/6/60/KBS_%22The_Producers%22_press_conference%2C_11_May_2015_10.jpg'
+
+%package -n python3-Wikidata
+Summary: Wikidata client library
+Provides: python-Wikidata
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-Wikidata
+This package provides easy APIs to use Wikidata_ for Python.
+>>> from wikidata.client import Client
+>>> client = Client() # doctest: +SKIP
+>>> entity = client.get('Q20145', load=True)
+>>> entity
+<wikidata.entity.Entity Q20145 'IU'>
+>>> entity.description
+m'South Korean singer and actress'
+>>> image_prop = client.get('P18')
+>>> image = entity[image_prop]
+>>> image
+<wikidata.commonsmedia.File 'File:KBS "The Producers" press conference, 11 May 2015 10.jpg'>
+>>> image.image_resolution
+(820, 1122)
+>>> image.image_url
+'https://upload.wikimedia.org/wikipedia/commons/6/60/KBS_%22The_Producers%22_press_conference%2C_11_May_2015_10.jpg'
+
+%package help
+Summary: Development documents and examples for Wikidata
+Provides: python3-Wikidata-doc
+%description help
+This package provides easy APIs to use Wikidata_ for Python.
+>>> from wikidata.client import Client
+>>> client = Client() # doctest: +SKIP
+>>> entity = client.get('Q20145', load=True)
+>>> entity
+<wikidata.entity.Entity Q20145 'IU'>
+>>> entity.description
+m'South Korean singer and actress'
+>>> image_prop = client.get('P18')
+>>> image = entity[image_prop]
+>>> image
+<wikidata.commonsmedia.File 'File:KBS "The Producers" press conference, 11 May 2015 10.jpg'>
+>>> image.image_resolution
+(820, 1122)
+>>> image.image_url
+'https://upload.wikimedia.org/wikipedia/commons/6/60/KBS_%22The_Producers%22_press_conference%2C_11_May_2015_10.jpg'
+
+%prep
+%autosetup -n Wikidata-0.7.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-Wikidata -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.7.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..160bc50
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+ff249be0b5a64070b88ae14d288d8eb1 Wikidata-0.7.0.tar.gz