]> git.pld-linux.org Git - packages/python-transaction.git/blame - python-transaction.spec
- rebuild with python 3.8
[packages/python-transaction.git] / python-transaction.spec
CommitLineData
77fde046
MK
1# TODO:
2# - Fix docs ((exception: No module named 'repoze'))
3# Conditional build:
4%bcond_with doc # don't build doc
5%bcond_without tests # do not perform "make test"
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
8
9# NOTES:
10%define module transaction
11%define egg_name %{module}
12%define pypi_name %{module}
13Summary: Generic transaction implementation for Python. It is mainly used by the ZODB
14Summary(pl.UTF-8): Ogólna implementacja transakcji dla Pythona. Głównie używana przez ZODB.
15Name: python-%{pypi_name}
16Version: 2.1.2
9bde13e4 17Release: 3
77fde046
MK
18License: ZPL 2.1
19Group: Libraries/Python
20Source0: https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
21# Source0-md5: 375a7f9d434ad0e9bf2039a3a0588e2b
22URL: https://github.com/zopefoundation/transaction
23#URL: https://pypi.python.org/pypi/%{pypi_name}
24BuildRequires: python-mock
25BuildRequires: rpm-pythonprov
26BuildRequires: rpmbuild(macros) >= 1.714
27%if %{with python2}
28BuildRequires: python-modules
29BuildRequires: python-pbr
30BuildRequires: python-setuptools
31%endif
32%if %{with python3}
33BuildRequires: python3-mock
34BuildRequires: python3-modules
35BuildRequires: python3-pbr
36BuildRequires: python3-setuptools
37%endif
38# when using /usr/bin/env or other in-place substitutions
39#BuildRequires: sed >= 4.0
40# replace with other requires if defined in setup.py
41Requires: python-modules
42BuildArch: noarch
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46
47%description -l pl.UTF-8
48
49%package -n python3-%{pypi_name}
50Summary: -
51Summary(pl.UTF-8): -
52Group: Libraries/Python
53Requires: python3-modules
54
55%description -n python3-%{pypi_name}
56
57%description -n python3-%{pypi_name} -l pl.UTF-8
58
59%package apidocs
60Summary: API documentation for Python %{module} module
61Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
62Group: Documentation
63
64%description apidocs
65API documentation for Pythona %{module} module.
66
67%description apidocs -l pl.UTF-8
68Dokumentacja API modułu Pythona %{module}.
69
70%prep
71%setup -q -n %{pypi_name}-%{version}
72
73%build
74%if %{with python2}
75%py_build %{?with_tests:test}
76%endif
77
78%if %{with python3}
79%py3_build %{?with_tests:test}
80%endif
81
82%if %{with doc}
83cd docs
84%{__make} -j1 html
85rm -rf _build/html/_sources
86%endif
87
88%install
89rm -rf $RPM_BUILD_ROOT
90
91%if %{with python2}
92%py_install
93
94# when files are installed in other way that standard 'setup.py
95# they need to be (re-)compiled
96# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
97%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
98%py_comp $RPM_BUILD_ROOT%{py_sitedir}
99
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)
113%doc README.rst
114%{py_sitescriptdir}/%{module}
115%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
116%endif
117
118%if %{with python3}
119%files -n python3-%{pypi_name}
120%defattr(644,root,root,755)
121%doc README.rst
122%{py3_sitescriptdir}/%{module}
123%{py3_sitescriptdir}/%{egg_name}-%{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/*
130%endif
This page took 0.053386 seconds and 4 git commands to generate.