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