]> git.pld-linux.org Git - packages/python-BTrees.git/blob - python-BTrees.spec
3ae4040de6280cd546cc46d390cc7aa8b8854675
[packages/python-BTrees.git] / python-BTrees.spec
1 # TODO:
2 # - fix tests:   ... skipped 'ZODB not available'   , ZODB though depends on BTrees
3 # - fix docs build
4
5 # Conditional build:
6 %bcond_with     doc     # don't build doc
7 %bcond_without  tests   # do not perform "make test"
8 %bcond_without  python2 # CPython 2.x module
9 %bcond_without  python3 # CPython 3.x module
10
11 %define         module  BTrees
12 %define         pypi_name       %{module}
13 # Keep strict dependencies as build process relays on *.h files from python-persistent
14 %define         persistent_ver  4.2.4.2
15
16 Summary:        Scalable persistent object containers
17 Summary(pl.UTF-8):      Skalowalne trwałe kontenery dla obiektów
18 Name:           python-%{module}
19 Version:        4.4.1
20 Release:        5
21 License:        ZPL 2.1
22 Group:          Libraries/Python
23 #Source0:       https://files.pythonhosted.org/packages/source/B/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
24 #Source0:       https://pypi.python.org/packages/source/B/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
25 Source0:        https://pypi.python.org/packages/6a/e2/d8c2a5b4cbc493b1ccb440d61bf0f62b8a0cb1c7b5aa403d5e18847545b3/BTrees-%{version}.tar.gz
26 # Source0-md5:  6a0178e30b94cf0cc44ae62e93187ecc
27 URL:            http://packages.python.org/BTrees
28 BuildRequires:  rpm-pythonprov
29 # for the py_build, py_install macros
30 BuildRequires:  rpmbuild(macros) >= 1.714
31 %if %{with python2}
32 BuildRequires:  python-devel
33 BuildRequires:  python-persistent = %{persistent_ver}
34 #BuildRequires: python-setuptools
35 BuildRequires:  python-transaction
36 %endif
37 %if %{with python3}
38 BuildRequires:  python3-devel
39 BuildRequires:  python3-persistent = %{persistent_ver}
40 #BuildRequires: python3-setuptools
41 BuildRequires:  python3-transaction
42 %endif
43
44 # when using /usr/bin/env or other in-place substitutions
45 #BuildRequires: sed >= 4.0
46 # replace with other requires if defined in setup.py
47 Requires:       python-modules
48 Requires:       python-persistent = %{persistent_ver}
49 Requires:       python-transaction
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53
54 %description -l pl.UTF-8
55
56 %package -n python3-%{module}
57 Summary:        -
58 Summary(pl.UTF-8):      -
59 Group:          Libraries/Python
60 Requires:       python3-modules
61 Requires:       python3-persistent = %{persistent_ver}
62 Requires:       python3-transaction
63
64 %description -n python3-%{module}
65
66 %description -n python3-%{module} -l pl.UTF-8
67
68 %package apidocs
69 Summary:        %{module} API documentation
70 Summary(pl.UTF-8):      Dokumentacja API %{module}
71 Group:          Documentation
72
73 %description apidocs
74 API documentation for %{module}.
75
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API %{module}.
78
79 %prep
80 %setup -q -n %{module}-%{version}
81
82 %build
83 %if %{with python2}
84 %py_build %{?with_tests:test}
85 %endif
86
87 %if %{with python3}
88 %py3_build %{?with_tests:test}
89 %endif
90
91 %if %{with doc}
92 cd docs
93 %{__make} -j1 html
94 rm -rf _build/html/_sources
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 %if %{with python2}
100 %py_install
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 CHANGES.rst README.rst
115 %dir %{py_sitedir}/%{module}
116 %{py_sitedir}/%{module}/*.py[co]
117 %{py_sitedir}/%{module}/*.[ch]
118 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
119 %{py_sitedir}/%{module}-%{version}-py*.egg-info
120 %endif
121
122 %if %{with python3}
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc CHANGES.rst README.rst
126 %dir %{py3_sitedir}/%{module}
127 %{py3_sitedir}/%{module}/*.py
128 %{py3_sitedir}/%{module}/*.[ch]
129 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
130 %{py3_sitedir}/%{module}/__pycache__
131 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
132 %endif
133
134 %if %{with doc}
135 %files apidocs
136 %defattr(644,root,root,755)
137 %doc docs/_build/html/*
138 %endif
This page took 0.041688 seconds and 2 git commands to generate.