]> git.pld-linux.org Git - packages/python-transaction.git/blob - python-transaction.spec
- updated to 3.0.1
[packages/python-transaction.git] / python-transaction.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module          transaction
9
10 Summary:        Generic transaction implementation for Python, mainly used by the ZODB
11 Summary(pl.UTF-8):      Ogólna implementacja transakcji dla Pythona, używana głównie przez ZODB
12 Name:           python-%{module}
13 Version:        3.0.1
14 Release:        1
15 License:        ZPL v2.1
16 Group:          Libraries/Python
17 Source0:        https://files.pythonhosted.org/packages/source/t/transaction/%{module}-%{version}.tar.gz
18 # Source0-md5:  6ffa07bd5021d502edb3998baee3701f
19 Patch0:         %{name}-mock.patch
20 URL:            https://github.com/zopefoundation/transaction
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools
26 %if %{with tests}
27 BuildRequires:  python-mock
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.5
32 BuildRequires:  python3-setuptools
33 %endif
34 %if %{with doc}
35 BuildRequires:  python3-repoze.sphinx.autointerface
36 BuildRequires:  sphinx-pdg-3 >= 1.8
37 %endif
38 Requires:       python-modules >= 1:2.7
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 This package contains a generic transaction implementation for Python.
44 It is mainly used by the ZODB.
45
46 %description -l pl.UTF-8
47 Ten pakiet zawiera ogólną implementację transakcji dla Ptyhona. Jest
48 używany głównie przez ZODB.
49
50 %package -n python3-%{module}
51 Summary:        Generic transaction implementation for Python, mainly used by the ZODB
52 Summary(pl.UTF-8):      Ogólna implementacja transakcji dla Pythona, używana głównie przez ZODB
53 Group:          Libraries/Python
54 Requires:       python3-modules >= 1:3.5
55
56 %description -n python3-%{module}
57 This package contains a generic transaction implementation for Python.
58 It is mainly used by the ZODB.
59
60 %description -n python3-%{module} -l pl.UTF-8
61 Ten pakiet zawiera ogólną implementację transakcji dla Ptyhona. Jest
62 używany głównie przez ZODB.
63
64 %package apidocs
65 Summary:        API documentation for Python %{module} module
66 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
67 Group:          Documentation
68
69 %description apidocs
70 API documentation for Python %{module} module.
71
72 %description apidocs -l pl.UTF-8
73 Dokumentacja API modułu Pythona %{module}.
74
75 %prep
76 %setup -q -n %{module}-%{version}
77 %patch0 -p1
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}
89 PYTHONPATH=$(pwd)/src \
90 %{__make} -C docs html \
91         SPHINXBUILD=sphinx-build-3
92 %endif
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %py_install
99
100 %py_postclean
101 %endif
102
103 %if %{with python3}
104 %py3_install
105 %endif
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with python2}
111 %files
112 %defattr(644,root,root,755)
113 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
114 %{py_sitescriptdir}/%{module}
115 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
116 %endif
117
118 %if %{with python3}
119 %files -n python3-%{module}
120 %defattr(644,root,root,755)
121 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
122 %{py3_sitescriptdir}/%{module}
123 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
124 %endif
125
126 %if %{with doc}
127 %files apidocs
128 %defattr(644,root,root,755)
129 %doc docs/_build/html/{_modules,_static,*.html,*.js}
130 %endif
This page took 0.595492 seconds and 3 git commands to generate.