]> git.pld-linux.org Git - SPECS.git/blob - python-pyrsistent.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-pyrsistent.spec
1 # NOTE: for versions >= 0.16 (for python 3.5+) see python3-pyrsistent.spec
2 #
3 # Conditional build:
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
7
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
13 Version:        0.15.7
14 Release:        2
15 License:        MIT
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/
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-hypothesis < 5
26 BuildRequires:  python-pytest < 5
27 BuildRequires:  python-six
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-devel >= 1:3.5
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-hypothesis
35 # < 5? works also with 5.4.1
36 BuildRequires:  python3-pytest < 5
37 BuildRequires:  python3-six
38 %endif
39 %endif
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)
44
45 %description
46 Pyrsistent is a number of persistent collections (by some referred to
47 as functional data structures). Persistent in the sense that they are
48 immutable.
49
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.
53
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
59
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
63 immutable.
64
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
68 immutable.
69
70 %prep
71 %setup -q -n %{module}-%{version}
72
73 # Remove bundled egg-info
74 %{__rm} -r %{module}.egg-info
75
76 %build
77 %if %{with python2}
78 %py_build
79
80 %if %{with tests}
81 %{__python} -m pytest tests
82 %endif
83 %endif
84
85 %if %{with python3}
86 %py3_build
87
88 %if %{with tests}
89 %{__python3} -m pytest tests
90 %endif
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{with python2}
97 %py_install
98
99 %py_postclean
100 %endif
101
102 %if %{with python3}
103 %py3_install
104 %endif
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %files
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
117 %endif
118
119 %if %{with python3}
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
128 %endif
This page took 0.949594 seconds and 3 git commands to generate.