]> git.pld-linux.org Git - packages/python-pickleshare.git/blob - python-pickleshare.spec
rebuild with python 3.10
[packages/python-pickleshare.git] / python-pickleshare.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  pickleshare
8 Summary:        A small 'shelve' like datastore with concurrency support
9 Summary(pl.UTF-8):      Mały, podobny do 'shelve', zarządca danych z obsługą współbieżności
10 Name:           python-%{module}
11 Version:        0.7.5
12 Release:        5
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://github.com/pickleshare/pickleshare/releases
16 Source0:        https://github.com/pickleshare/pickleshare/archive/%{version}/%{module}-%{version}.tar.gz
17 # Source0-md5:  79387de9fd8cc26e29d5cae9fc2fab9d
18 URL:            https://github.com/pickleshare/pickleshare
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-pathlib2
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools
29 %if %{with tests} && "%{py3_ver}" < "3.4"
30 BuildRequires:  python3-pathlib2
31 %endif
32 %endif
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.714
35 Requires:       python-modules >= 1:2.6
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 PickleShareDB object acts like a normal dictionary. Unlike shelve,
41 many processes can access the database simultaneously. Changing a
42 value in database is immediately visible to other processes accessing
43 the same database. Concurrency is possible because the values are
44 stored in separate files. Hence the "database" is a directory where
45 all files are governed by PickleShare.
46
47 %description -l pl.UTF-8
48 Obiekt PickleShareDB działa jak zwykły słownik. W przeciwieństwie do
49 shelve, wiele procesów może jednocześnie odwoływać się do bazy danych.
50 Zmiana wartości w bazie danych jest natychmiast widoczna dla innych
51 procesów odwołujących się do tej samej bazy. Współbieżność jest
52 możliwa, ponieważ wartości są zapisane w osobnych plikach. Stąd "baza
53 dnaych" to katalog, gdzie znajdują się wszystkie pliki utrzymywane
54 przez PickleShare.
55
56 %package -n python3-%{module}
57 Summary:        A small 'shelve' like datastore with concurrency support
58 Summary(pl.UTF-8):      Mały, podobny do 'shelve', zarządca danych z obsługą współbieżności
59 Group:          Libraries/Python
60 Requires:       python3-modules >= 1:3.2
61
62 %description -n python3-%{module}
63 PickleShareDB object acts like a normal dictionary. Unlike shelve,
64 many processes can access the database simultaneously. Changing a
65 value in database is immediately visible to other processes accessing
66 the same database. Concurrency is possible because the values are
67 stored in separate files. Hence the "database" is a directory where
68 all files are governed by PickleShare.
69
70 %description -n python3-%{module} -l pl.UTF-8
71 Obiekt PickleShareDB działa jak zwykły słownik. W przeciwieństwie do
72 shelve, wiele procesów może jednocześnie odwoływać się do bazy danych.
73 Zmiana wartości w bazie danych jest natychmiast widoczna dla innych
74 procesów odwołujących się do tej samej bazy. Współbieżność jest
75 możliwa, ponieważ wartości są zapisane w osobnych plikach. Stąd "baza
76 dnaych" to katalog, gdzie znajdują się wszystkie pliki utrzymywane
77 przez PickleShare.
78
79 %prep
80 %setup -q -n %{module}-%{version}
81
82 %build
83 %if %{with python2}
84 %py_build
85
86 %{?with_tests:%{__python} -m pytest test_pickleshare.py}
87 %endif
88
89 %if %{with python3}
90 %py3_build
91
92 %{?with_tests:%{__python3} -m pytest test_pickleshare.py}
93 %endif
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %py_install
100
101 %py_postclean
102 %endif
103
104 %if %{with python3}
105 %py3_install
106 %endif
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %if %{with python2}
112 %files
113 %defattr(644,root,root,755)
114 %doc LICENSE README.md
115 %{py_sitescriptdir}/pickleshare.py[co]
116 %{py_sitescriptdir}/pickleshare-%{version}-py*.egg-info
117 %endif
118
119 %if %{with python3}
120 %files -n python3-%{module}
121 %defattr(644,root,root,755)
122 %doc LICENSE README.md
123 %{py3_sitescriptdir}/pickleshare.py
124 %{py3_sitescriptdir}/__pycache__/pickleshare.cpython-*.pyc
125 %{py3_sitescriptdir}/pickleshare-%{version}-py*.egg-info
126 %endif
This page took 0.075614 seconds and 3 git commands to generate.