diff --git a/pickleshare-0.7.4.tar.gz b/pickleshare-0.7.4.tar.gz deleted file mode 100644 index a270577..0000000 Binary files a/pickleshare-0.7.4.tar.gz and /dev/null differ diff --git a/pickleshare-0.7.5.tar.gz b/pickleshare-0.7.5.tar.gz new file mode 100644 index 0000000..ccda2a1 Binary files /dev/null and b/pickleshare-0.7.5.tar.gz differ diff --git a/python-pickleshare.spec b/python-pickleshare.spec index eaf5728..18a7e30 100644 --- a/python-pickleshare.spec +++ b/python-pickleshare.spec @@ -1,82 +1,157 @@ -Name: python-pickleshare -Version: 0.7.4 -Release: 11 -Summary: A small 'shelve' like datastore with concurrency support -License: MIT -URL: https://github.com/pickleshare/pickleshare -Source0: https://files.pythonhosted.org/packages/source/p/pickleshare/pickleshare-%{version}.tar.gz +%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://files.pythonhosted.org/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz +BuildArch: noarch -BuildArch: noarch -BuildRequires: python2-setuptools python2-devel python3-setuptools python3-devel +Requires: python3-pathlib2 %description -PickleShare - a small 'shelve' like datastore with concurrency support. +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. +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. +Concurrency is possible because the values are stored in separate files. Hence +the "database" is a directory where *all* files are governed by PickleShare. -%package -n python2-pickleshare -Summary: A small 'shelve' like datastore with concurrency support -%{?python_provide:%python_provide python2-pickleshare} +Example usage:: -%description -n python2-pickleshare -PickleShare - a small 'shelve' like datastore with concurrency support. + 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()) -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. +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. -Concurrency is possible because the values are stored in separate files. -Hence the "database" is a directory where all files are governed -by PickleShare. +Installation guide: pip install pickleshare -%package -n python3-pickleshare -Summary: A small 'shelve' like datastore with concurrency support -%{?python_provide:%python_provide python3-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. +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 + -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. %prep -%autosetup -n pickleshare-%{version} -p1 -rm -rf pickleshare.egg-info -sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/python/' pickleshare.py +%autosetup -n pickleshare-0.7.5 %build -%py2_build %py3_build %install %py3_install -%py2_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 python2-pickleshare -%license LICENSE -%{python2_sitelib}/pickleshare.py* -%{python2_sitelib}/pickleshare-%{version}-py?.?.egg-info +%files -n python3-pickleshare -f filelist.lst +%dir %{python3_sitelib}/* -%files -n python3-pickleshare -%license LICENSE -%{python3_sitelib}/__pycache__/* -%{python3_sitelib}/pickleshare.py -%{python3_sitelib}/pickleshare-%{version}-py?.?.egg-info +%files help -f doclist.lst +%{_docdir}/* %changelog +* Sat Jul 15 2023 lichaoran - 0.7.5-1 +- Package Spec generated + * Thu Mar 5 2020 lingsheng - 0.7.4-11 - Package init