diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-09 17:32:17 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-09 17:32:17 +0000 |
commit | 2e15a38900f7acc46dd387f2a884bad6681b67a7 (patch) | |
tree | 903468ca5ae516b3e7ac173fe4835400d8eb66e2 | |
parent | 542e9d3480bffe7c874afce0d1737162cb94a8c2 (diff) |
automatic import of python-tinydb
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-tinydb.spec | 115 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 117 insertions, 0 deletions
@@ -0,0 +1 @@ +/tinydb-4.7.1.tar.gz diff --git a/python-tinydb.spec b/python-tinydb.spec new file mode 100644 index 0000000..47a2a53 --- /dev/null +++ b/python-tinydb.spec @@ -0,0 +1,115 @@ +%global _empty_manifest_terminate_build 0 +Name: python-tinydb +Version: 4.7.1 +Release: 1 +Summary: TinyDB is a tiny, document oriented database optimized for your happiness :) +License: MIT +URL: https://github.com/msiemens/tinydb +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/32/ed/78f24df0fec08f0fb92fc4b4758adcab780660caa8c3f94c2e175eb7e2ba/tinydb-4.7.1.tar.gz +BuildArch: noarch + +Requires: python3-typing-extensions + +%description + >>> User = Query() + >>> # Search for a field value + >>> db.search(User.name == 'John') + [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}] + >>> # Combine two queries with logical and + >>> db.search((User.name == 'John') & (User.age <= 30)) + [{'name': 'John', 'age': 22}] + >>> # Combine two queries with logical or + >>> db.search((User.name == 'John') | (User.name == 'Bob')) + [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}, {'name': 'Bob', 'age': 42}] + >>> # Apply transformation to field with `map` + >>> db.search((User.age.map(lambda x: x + x) == 44)) + >>> [{'name': 'John', 'age': 22}] + >>> # More possible comparisons: != < > <= >= + >>> # More possible checks: where(...).matches(regex), where(...).test(your_test_func) + +%package -n python3-tinydb +Summary: TinyDB is a tiny, document oriented database optimized for your happiness :) +Provides: python-tinydb +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-tinydb + >>> User = Query() + >>> # Search for a field value + >>> db.search(User.name == 'John') + [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}] + >>> # Combine two queries with logical and + >>> db.search((User.name == 'John') & (User.age <= 30)) + [{'name': 'John', 'age': 22}] + >>> # Combine two queries with logical or + >>> db.search((User.name == 'John') | (User.name == 'Bob')) + [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}, {'name': 'Bob', 'age': 42}] + >>> # Apply transformation to field with `map` + >>> db.search((User.age.map(lambda x: x + x) == 44)) + >>> [{'name': 'John', 'age': 22}] + >>> # More possible comparisons: != < > <= >= + >>> # More possible checks: where(...).matches(regex), where(...).test(your_test_func) + +%package help +Summary: Development documents and examples for tinydb +Provides: python3-tinydb-doc +%description help + >>> User = Query() + >>> # Search for a field value + >>> db.search(User.name == 'John') + [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}] + >>> # Combine two queries with logical and + >>> db.search((User.name == 'John') & (User.age <= 30)) + [{'name': 'John', 'age': 22}] + >>> # Combine two queries with logical or + >>> db.search((User.name == 'John') | (User.name == 'Bob')) + [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}, {'name': 'Bob', 'age': 42}] + >>> # Apply transformation to field with `map` + >>> db.search((User.age.map(lambda x: x + x) == 44)) + >>> [{'name': 'John', 'age': 22}] + >>> # More possible comparisons: != < > <= >= + >>> # More possible checks: where(...).matches(regex), where(...).test(your_test_func) + +%prep +%autosetup -n tinydb-4.7.1 + +%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-tinydb -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 4.7.1-1 +- Package Spec generated @@ -0,0 +1 @@ +d570288bdae4338497ed8655261bbf89 tinydb-4.7.1.tar.gz |