]> git.pld-linux.org Git - packages/python-transaction.git/blob - python-transaction.spec
rebuild with python 3.10
[packages/python-transaction.git] / python-transaction.spec
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}
13 Summary:        Generic transaction implementation for Python. It is mainly used by the ZODB
14 Summary(pl.UTF-8):      Ogólna implementacja transakcji dla Pythona. Głównie używana przez ZODB.
15 Name:           python-%{pypi_name}
16 Version:        2.1.2
17 Release:        5
18 License:        ZPL 2.1
19 Group:          Libraries/Python
20 Source0:        https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
21 # Source0-md5:  375a7f9d434ad0e9bf2039a3a0588e2b
22 URL:            https://github.com/zopefoundation/transaction
23 #URL:           https://pypi.python.org/pypi/%{pypi_name}
24 BuildRequires:  python-mock
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.714
27 %if %{with python2}
28 BuildRequires:  python-modules
29 BuildRequires:  python-pbr
30 BuildRequires:  python-setuptools
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-mock
34 BuildRequires:  python3-modules
35 BuildRequires:  python3-pbr
36 BuildRequires:  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
41 Requires:       python-modules
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46
47 %description -l pl.UTF-8
48
49 %package -n python3-%{pypi_name}
50 Summary:        -
51 Summary(pl.UTF-8):      -
52 Group:          Libraries/Python
53 Requires:       python3-modules
54
55 %description -n python3-%{pypi_name}
56
57 %description -n python3-%{pypi_name} -l pl.UTF-8
58
59 %package apidocs
60 Summary:        API documentation for Python %{module} module
61 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
62 Group:          Documentation
63
64 %description apidocs
65 API documentation for Pythona %{module} module.
66
67 %description apidocs -l pl.UTF-8
68 Dokumentacja 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}
83 cd docs
84 %{__make} -j1 html
85 rm -rf _build/html/_sources
86 %endif
87
88 %install
89 rm -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
108 rm -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.14614 seconds and 3 git commands to generate.