]> git.pld-linux.org Git - packages/python-amqp.git/blob - python-amqp.spec
- up to 2.5.2
[packages/python-amqp.git] / python-amqp.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # build doc (broken)
4 %bcond_with     tests   # do not perform "make test"
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module          amqp
9 %define         pypi_name       amqp
10 Summary:        AMQP 0.9.1 client library
11 Summary(pl.UTF-8):      Biblioteka kliencka AMQP 0.9.1
12 Name:           python-%{module}
13 Version:        2.5.2
14 Release:        1
15 License:        LGPL v2.1
16 Group:          Libraries/Python
17 # Source0:      https://files.pythonhosted.org/packages/source/a/amqp/%{module}-%{version}.tar.gz
18 Source0:        https://pypi.debian.net/%{module}/%{module}-%{version}.tar.gz
19 # Source0-md5:  852ecff645c00f124c78915fcc8ea7c0
20 URL:            http://amqp.readthedocs.org/
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.710
23 %if %{with python2}
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-coverage >= 3.0
27 BuildRequires:  python-mock
28 BuildRequires:  python-nose
29 BuildRequires:  python-nose-cover3
30 BuildRequires:  python-unittest2>=0.4.0
31 %endif
32 %if %{with doc}
33 BuildRequires:  python-sphinxcontrib-issuetracker
34 BuildRequires:  sphinx-pdg-2
35 %endif
36 %endif
37 %if %{with python3}
38 BuildRequires:  python3-setuptools
39 %if %{with tests}
40 BuildRequires:  python3-coverage >= 3.0
41 BuildRequires:  python3-mock
42 BuildRequires:  python3-nose
43 BuildRequires:  python3-nose-cover3
44 %endif
45 %if %{with doc}
46 BuildRequires:  python3-sphinxcontrib-issuetracker
47 BuildRequires:  sphinx-pdg-3
48 %endif
49 %endif
50 Requires:       python-modules
51 BuildArch:      noarch
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 This is a fork of amqplib which was originally written by Barry
56 Pederson. It is maintained by the Celery project, and used by kombu as
57 a pure python alternative when librabbitmq is not available.
58
59 This library should be API compatible with librabbitmq.
60
61 %package -n python3-%{module}
62 Summary:        AMQP 0.9.1 client library
63 Summary(pl.UTF-8):      Biblioteka kliencka AMQP 0.9.1
64 Group:          Libraries/Python
65 Requires:       python3-modules
66
67 %description -n python3-%{module}
68 This is a fork of amqplib which was originally written by Barry
69 Pederson. It is maintained by the Celery project, and used by kombu as
70 a pure python alternative when librabbitmq is not available.
71
72 This library should be API compatible with librabbitmq.
73
74 %package apidocs
75 Summary:        %{module} API documentation
76 Summary(pl.UTF-8):      Dokumentacja API %{module}
77 Group:          Documentation
78
79 %description apidocs
80 API documentation for %{module}.
81
82 %description apidocs -l pl.UTF-8
83 Dokumentacja API %{module}.
84
85 %package -n python3-%{module}-apidocs
86 Summary:        %{module} API documentation
87 Summary(pl.UTF-8):      Dokumentacja API %{module}
88 Group:          Documentation
89
90 %description -n python3-%{module}-apidocs
91 API documentation for %{module}.
92
93 %description -n python3-%{module}-apidocs -l pl.UTF-8
94 Dokumentacja API %{module}.
95
96 %prep
97 %setup -q -n %{module}-%{version}
98
99 %build
100 %if %{with python2}
101 %py_build %{?with_tests:test}
102
103 %if %{with doc}
104 cd docs
105 PYTHONPATH=../build-2/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-2
106 rm -rf .build/html/_sources
107 mv .build .build2
108 cd ..
109 %endif
110
111 %endif
112
113 %if %{with python3}
114 %py3_build %{?with_tests:test}
115
116 %if %{with doc}
117 cd docs
118 PYTHONPATH=../build-3/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-3
119 rm -rf .build/html/_sources
120 mv .build .build3
121 cd ..
122 %endif
123 %endif
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with python2}
129 %py_install
130
131 %py_postclean
132 %endif
133
134 %if %{with python3}
135 %py3_install
136 %endif
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %files
143 %defattr(644,root,root,755)
144 %doc Changelog README.rst
145 %dir %{py_sitescriptdir}/%{module}
146 %{py_sitescriptdir}/%{module}/*.py[co]
147 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
148
149 %if %{with doc}
150 %files apidocs
151 %defattr(644,root,root,755)
152 %doc docs/.build2/html/*
153 %endif
154 %endif
155
156 %if %{with python3}
157 %files -n python3-%{module}
158 %defattr(644,root,root,755)
159 %doc Changelog README.rst
160 %{py3_sitescriptdir}/%{module}
161 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
162
163 %if %{with doc}
164 %files -n python3-%{module}-apidocs
165 %defattr(644,root,root,755)
166 %doc docs/.build3/html/*
167 %endif
168 %endif
This page took 0.101987 seconds and 3 git commands to generate.