]> git.pld-linux.org Git - packages/python3-amqp.git/blame - python-amqp.spec
automatic change: use py_build/py_install macros
[packages/python3-amqp.git] / python-amqp.spec
CommitLineData
cc864027
JK
1#
2# Conditional build:
3%bcond_without doc # don't build doc
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
9Summary: AMQP 0.9.1 client library
10Summary(pl.UTF-8): Biblioteka kliencka AMQP 0.9.1
11Name: python-%{module}
12Version: 1.4.7
75260ea2 13Release: 1
cc864027
JK
14License: LGPL v2.1
15Group: Libraries/Python
16Source0: https://pypi.python.org/packages/source/a/amqp/%{module}-%{version}.tar.gz
17# Source0-md5: 5aa44107d142f56385d2375f302cf7b0
18URL: http://amqp.readthedocs.org/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.612
21%if %{with python2}
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-coverage >= 3.0
25BuildRequires: python-mock
26BuildRequires: python-nose
27BuildRequires: python-nose-cover3
28BuildRequires: python-unittest2>=0.4.0
29%endif
30%if %{with doc}
31BuildRequires: python-sphinxcontrib-issuetracker
32BuildRequires: sphinx-pdg
33%endif
34%endif
35%if %{with python3}
36BuildRequires: python3-setuptools
37%if %{with tests}
38BuildRequires: python3-coverage >= 3.0
39BuildRequires: python3-mock
40BuildRequires: python3-nose
41BuildRequires: python3-nose-cover3
42%endif
43%endif
44Requires: python-modules
45BuildArch: noarch
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49This is a fork of amqplib which was originally written by Barry
50Pederson. It is maintained by the Celery project, and used by kombu as
51a pure python alternative when librabbitmq is not available.
52
53This library should be API compatible with librabbitmq.
54
55%package -n python3-%{module}
56Summary: AMQP 0.9.1 client library
57Summary(pl.UTF-8): Biblioteka kliencka AMQP 0.9.1
58Group: Libraries/Python
59Requires: python3-modules
60
61%description -n python3-%{module}
62This is a fork of amqplib which was originally written by Barry
63Pederson. It is maintained by the Celery project, and used by kombu as
64a pure python alternative when librabbitmq is not available.
65
66This library should be API compatible with librabbitmq.
67
68%package apidocs
69Summary: %{module} API documentation
70Summary(pl.UTF-8): Dokumentacja API %{module}
71Group: Documentation
72
73%description apidocs
74API documentation for %{module}.
75
76%description apidocs -l pl.UTF-8
77Dokumentacja API %{module}.
78
79%prep
80%setup -q -n %{module}-%{version}
81
82%build
83%if %{with python2}
1475cc83 84%py_build %{?with_tests:test}
cc864027
JK
85
86%if %{with doc}
87cd docs
88PYTHONPATH=../build-2/lib %{__make} -j1 html
89rm -rf .build/html/_sources
90cd ..
91%endif
92%endif
93
94%if %{with python3}
1475cc83 95%py3_build %{?with_tests:test}
cc864027
JK
96%endif
97
98%install
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
1475cc83 102%py_install
cc864027
JK
103
104%py_postclean
105%endif
106
107%if %{with python3}
1475cc83 108%py3_install
cc864027
JK
109%endif
110
111%clean
112rm -rf $RPM_BUILD_ROOT
113
114%if %{with python2}
115%files
116%defattr(644,root,root,755)
117%doc Changelog README.rst
118%dir %{py_sitescriptdir}/%{module}
119%{py_sitescriptdir}/%{module}/*.py[co]
120%dir %{py_sitescriptdir}/%{module}/tests
121%{py_sitescriptdir}/%{module}/tests/*.py[co]
122%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
123%endif
124
125%if %{with python3}
126%files -n python3-%{module}
127%defattr(644,root,root,755)
128%doc Changelog README.rst
129%{py3_sitescriptdir}/%{module}
130%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
131%endif
132
133%if %{with doc}
134%files apidocs
135%defattr(644,root,root,755)
136%doc docs/.build/html/*
137%endif
This page took 0.651821 seconds and 4 git commands to generate.