1 # NOTE: for versions >= 0.16 (for python 3.5+) see python3-pyrsistent.spec
4 %bcond_without python2 # CPython 2.x module
5 %bcond_with python3 # CPython 3.x module (built from python3-pyrsistent.spec)
6 %bcond_without tests # unit tests
8 %define module pyrsistent
9 Summary: Persistent/Functional/Immutable data structures
10 Summary(pl.UTF-8): Trwałe/funkcyjne/niezmienne struktury danych
11 Name: python-pyrsistent
12 # keep 0.15.x for python2 support
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/pyrsistent/
18 Source0: https://files.pythonhosted.org/packages/source/p/pyrsistent/%{module}-%{version}.tar.gz
19 # Source0-md5: da9486d00ef5b213f40d5cf3c5bca82d
20 URL: http://github.com/tobgu/pyrsistent/
22 BuildRequires: python-devel >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-hypothesis < 5
26 BuildRequires: python-pytest < 5
27 BuildRequires: python-six
31 BuildRequires: python3-devel >= 1:3.5
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-hypothesis
35 # < 5? works also with 5.4.1
36 BuildRequires: python3-pytest < 5
37 BuildRequires: python3-six
40 BuildRequires: rpm-pythonprov
41 BuildRequires: rpmbuild(macros) >= 1.714
42 Requires: python-modules >= 1:2.7
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Pyrsistent is a number of persistent collections (by some referred to
47 as functional data structures). Persistent in the sense that they are
50 %description -l pl.UTF-8
51 Pyrsistent to zbiór trwałych kolekcji (nazywanych także funkcyjnymi
52 strukturami danych). Są trwałe w tym sensie, że są niezmienne.
54 %package -n python3-pyrsistent
55 Summary: Persistent/Functional/Immutable data structures
56 Summary(pl.UTF-8): Trwałe/funkcyjne/niezmienne struktury danych
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.5
60 %description -n python3-pyrsistent
61 Pyrsistent is a number of persistent collections (by some referred to
62 as functional data structures). Persistent in the sense that they are
65 %description -n python3-pyrsistent -l pl.UTF-8
66 Pyrsistent is a number of persistent collections (by some referred to
67 as functional data structures). Persistent in the sense that they are
71 %setup -q -n %{module}-%{version}
73 # Remove bundled egg-info
74 %{__rm} -r %{module}.egg-info
81 %{__python} -m pytest tests
89 %{__python3} -m pytest tests
94 rm -rf $RPM_BUILD_ROOT
107 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
112 %doc CHANGES.txt LICENCE.mit README.rst
113 %attr(755,root,root) %{py_sitedir}/pvectorc.so
114 %{py_sitedir}/_pyrsistent_version.py[co]
115 %{py_sitedir}/pyrsistent
116 %{py_sitedir}/pyrsistent-%{version}-py*.egg-info
120 %files -n python3-pyrsistent
121 %defattr(644,root,root,755)
122 %doc CHANGES.txt LICENCE.mit README.rst
123 %attr(755,root,root) %{py3_sitedir}/pvectorc.cpython-*.so
124 %{py3_sitedir}/_pyrsistent_version.py
125 %{py3_sitedir}/__pycache__/_pyrsistent_version.cpython-*.py[co]
126 %{py3_sitedir}/pyrsistent
127 %{py3_sitedir}/pyrsistent-%{version}-py*.egg-info