diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-09 15:01:37 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-09 15:01:37 +0000 |
commit | fc0de0f5390969b35c68ed89a2da08177f18a05d (patch) | |
tree | c453b4b126dfa0c687378dc9f0e500e49b957ad9 | |
parent | 2ad7081bf87d77ad3b9990e487040ebe13b7f4fc (diff) |
automatic import of python-pickleshare
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pickleshare.spec | 154 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 156 insertions, 0 deletions
@@ -0,0 +1 @@ +/pickleshare-0.7.5.tar.gz diff --git a/python-pickleshare.spec b/python-pickleshare.spec new file mode 100644 index 0000000..dd36a23 --- /dev/null +++ b/python-pickleshare.spec @@ -0,0 +1,154 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pickleshare +Version: 0.7.5 +Release: 1 +Summary: Tiny 'shelve'-like database with concurrency support +License: MIT +URL: https://github.com/pickleshare/pickleshare +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz +BuildArch: noarch + +Requires: python3-pathlib2 + +%description +PickleShare - a small 'shelve' like datastore with concurrency support + +Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, +many processes can access the database simultaneously. Changing a value in +database is immediately visible to other processes accessing the same database. + +Concurrency is possible because the values are stored in separate files. Hence +the "database" is a directory where *all* files are governed by PickleShare. + +Example usage:: + + from pickleshare import * + db = PickleShareDB('~/testpickleshare') + db.clear() + print("Should be empty:",db.items()) + db['hello'] = 15 + db['aku ankka'] = [1,2,313] + db['paths/are/ok/key'] = [1,(5,46)] + print(db.keys()) + +This module is certainly not ZODB, but can be used for low-load +(non-mission-critical) situations where tiny code size trumps the +advanced features of a "real" object database. + +Installation guide: pip install pickleshare + + + + +%package -n python3-pickleshare +Summary: Tiny 'shelve'-like database with concurrency support +Provides: python-pickleshare +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pickleshare +PickleShare - a small 'shelve' like datastore with concurrency support + +Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, +many processes can access the database simultaneously. Changing a value in +database is immediately visible to other processes accessing the same database. + +Concurrency is possible because the values are stored in separate files. Hence +the "database" is a directory where *all* files are governed by PickleShare. + +Example usage:: + + from pickleshare import * + db = PickleShareDB('~/testpickleshare') + db.clear() + print("Should be empty:",db.items()) + db['hello'] = 15 + db['aku ankka'] = [1,2,313] + db['paths/are/ok/key'] = [1,(5,46)] + print(db.keys()) + +This module is certainly not ZODB, but can be used for low-load +(non-mission-critical) situations where tiny code size trumps the +advanced features of a "real" object database. + +Installation guide: pip install pickleshare + + + + +%package help +Summary: Development documents and examples for pickleshare +Provides: python3-pickleshare-doc +%description help +PickleShare - a small 'shelve' like datastore with concurrency support + +Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, +many processes can access the database simultaneously. Changing a value in +database is immediately visible to other processes accessing the same database. + +Concurrency is possible because the values are stored in separate files. Hence +the "database" is a directory where *all* files are governed by PickleShare. + +Example usage:: + + from pickleshare import * + db = PickleShareDB('~/testpickleshare') + db.clear() + print("Should be empty:",db.items()) + db['hello'] = 15 + db['aku ankka'] = [1,2,313] + db['paths/are/ok/key'] = [1,(5,46)] + print(db.keys()) + +This module is certainly not ZODB, but can be used for low-load +(non-mission-critical) situations where tiny code size trumps the +advanced features of a "real" object database. + +Installation guide: pip install pickleshare + + + + +%prep +%autosetup -n pickleshare-0.7.5 + +%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-pickleshare -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 0.7.5-1 +- Package Spec generated @@ -0,0 +1 @@ +44ab782615894a812ab96669a122a634 pickleshare-0.7.5.tar.gz |