upgrade to 7.5

Signed-off-by: Li Chaoran <pkwarcraft@gmail.com>
This commit is contained in:
Li Chaoran 2023-07-15 19:42:45 +08:00
parent 8b299c389a
commit 14b7199879
3 changed files with 129 additions and 54 deletions

Binary file not shown.

BIN
pickleshare-0.7.5.tar.gz Normal file

Binary file not shown.

View File

@ -1,82 +1,157 @@
%global _empty_manifest_terminate_build 0
Name: python-pickleshare Name: python-pickleshare
Version: 0.7.4 Version: 0.7.5
Release: 11 Release: 1
Summary: A small 'shelve' like datastore with concurrency support Summary: Tiny 'shelve'-like database with concurrency support
License: MIT License: MIT
URL: https://github.com/pickleshare/pickleshare URL: https://github.com/pickleshare/pickleshare
Source0: https://files.pythonhosted.org/packages/source/p/pickleshare/pickleshare-%{version}.tar.gz 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 %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. Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve,
Unlike shelve, many processes can access the database simultaneously. many processes can access the database simultaneously. Changing a value in
Changing a value in database is immediately visible to other processes database is immediately visible to other processes accessing the same database.
accessing the same database.
Concurrency is possible because the values are stored in separate files. Concurrency is possible because the values are stored in separate files. Hence
Hence the "database" is a directory where all files are governed the "database" is a directory where *all* files are governed by PickleShare.
by PickleShare.
%package -n python2-pickleshare Example usage::
Summary: A small 'shelve' like datastore with concurrency support
%{?python_provide:%python_provide python2-pickleshare} 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
%description -n python2-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.
%package -n python3-pickleshare %package -n python3-pickleshare
Summary: A small 'shelve' like datastore with concurrency support Summary: Tiny 'shelve'-like database with concurrency support
%{?python_provide:%python_provide python3-pickleshare} Provides: python-pickleshare
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-pickleshare %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 %prep
%autosetup -n pickleshare-%{version} -p1 %autosetup -n pickleshare-0.7.5
rm -rf pickleshare.egg-info
sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/python/' pickleshare.py
%build %build
%py2_build
%py3_build %py3_build
%install %install
%py3_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 %files -n python3-pickleshare -f filelist.lst
%license LICENSE %dir %{python3_sitelib}/*
%{python2_sitelib}/pickleshare.py*
%{python2_sitelib}/pickleshare-%{version}-py?.?.egg-info
%files -n python3-pickleshare %files help -f doclist.lst
%license LICENSE %{_docdir}/*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/pickleshare.py
%{python3_sitelib}/pickleshare-%{version}-py?.?.egg-info
%changelog %changelog
* Sat Jul 15 2023 lichaoran <pkwarcraft@hotmail.com> - 0.7.5-1
- Package Spec generated
* Thu Mar 5 2020 lingsheng <lingsheng@huawei.com> - 0.7.4-11 * Thu Mar 5 2020 lingsheng <lingsheng@huawei.com> - 0.7.4-11
- Package init - Package init