From 2e15a38900f7acc46dd387f2a884bad6681b67a7 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 9 Mar 2023 17:32:17 +0000 Subject: automatic import of python-tinydb --- .gitignore | 1 + python-tinydb.spec | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 117 insertions(+) create mode 100644 python-tinydb.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..2d650af 100644 --- a/.gitignore +++ b/.gitignore @@ -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 - 4.7.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..9ced04a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +d570288bdae4338497ed8655261bbf89 tinydb-4.7.1.tar.gz -- cgit v1.2.3