]> git.pld-linux.org Git - packages/python-pickleshare.git/blame - python-pickleshare.spec
Version 0.7.4. Release 1. Initial.
[packages/python-pickleshare.git] / python-pickleshare.spec
CommitLineData
771195b8
MK
1# TODO:
2# - fix tests
3
4# Conditional build:
5%bcond_with doc # don't build doc
6%bcond_with tests # do not perform "make test"
7%bcond_without python2 # CPython 2.x module
8%bcond_without python3 # CPython 3.x module
9
10%define module pickleshare
11Summary: A small 'shelve' like datastore with concurrency support
12Summary(pl.UTF-8): Mały, podobny do 'shelve', zarządca danych z wsparciem dla konkurencyjności
13Name: python-%{module}
14Version: 0.7.4
15Release: 1
16License: MIT
17Group: Libraries/Python
18Source0: https://github.com/pickleshare/pickleshare/archive/%{version}.tar.gz
19# Source0-md5: edd1fc04bc12d9748c852218d2cb86fd
20URL: https://github.com/pickleshare/pickleshare
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
24BuildRequires: python-modules
25BuildRequires: python-setuptools
26%endif
27%if %{with python3}
28BuildRequires: python3-modules
29BuildRequires: python3-setuptools
30%endif
31Requires: python-modules
32Requires: python-pathlib2
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37PickleShareDB object acts like a normal dictionary. Unlike shelve,
38many processes can access the database simultaneously. Changing a
39value in database is immediately visible to other processes accessing
40the same database. Concurrency is possible because the values are
41stored in separate files. Hence the "database" is a directory where
42all files are governed by PickleShare.
43
44# %%description -l pl.UTF-8
45
46%package -n python3-%{module}
47Summary: -
48Summary(pl.UTF-8): -
49Group: Libraries/Python
50Requires: python3-modules
51Requires: python3-pathlib2
52
53
54%description -n python3-%{module}
55PickleShareDB object acts like a normal dictionary. Unlike shelve,
56many processes can access the database simultaneously. Changing a
57value in database is immediately visible to other processes accessing
58the same database. Concurrency is possible because the values are
59stored in separate files. Hence the "database" is a directory where
60all files are governed by PickleShare.
61
62# %%description -n python3-%{module} -l pl.UTF-8
63
64%package apidocs
65Summary: %{module} API documentation
66Summary(pl.UTF-8): Dokumentacja API %{module}
67Group: Documentation
68
69%description apidocs
70API documentation for %{module}.
71
72%description apidocs -l pl.UTF-8
73Dokumentacja API %{module}.
74
75%prep
76%setup -q -n %{module}-%{version}
77
78
79%build
80%if %{with python2}
81%py_build %{?with_tests:test}
82%endif
83
84%if %{with python3}
85%py3_build %{?with_tests:test}
86%endif
87
88%if %{with doc}
89cd docs
90%{__make} -j1 html
91rm -rf _build/html/_sources
92%endif
93
94%install
95rm -rf $RPM_BUILD_ROOT
96
97%if %{with python2}
98%py_install
99
100%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
101%py_comp $RPM_BUILD_ROOT%{py_sitedir}
102
103%py_postclean
104%endif
105
106%if %{with python3}
107%py3_install
108%endif
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%if %{with python2}
114%files
115%defattr(644,root,root,755)
116%doc README.md
117%{py_sitescriptdir}/%{module}.py*
118%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
119%endif
120
121%if %{with python3}
122%files -n python3-%{module}
123%defattr(644,root,root,755)
124%doc README.md
125%{py3_sitescriptdir}/%{module}.py
126%{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
127
128
129%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
130%endif
131
132%if %{with doc}
133%files apidocs
134%defattr(644,root,root,755)
135%doc docs/_build/html/*
136%endif
This page took 0.097174 seconds and 4 git commands to generate.