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