File python-qpid.spec of Package python-qpid

#
# spec file for package python-qpid
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           python-qpid
Version:        0.32
Release:        0
Summary:        Python client library for AMQP
License:        Apache-2.0
Group:          Development/Libraries/Python
Url:            http://qpid.apache.org
Source0:        http://www.apache.org/dist/qpid/%{version}/qpid-python-%{version}.tar.gz
BuildRequires:  python
BuildRequires:  python-devel
BuildRequires:  python-xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1200
BuildArch:      noarch
%endif

%description
The Apache Qpid Python client library for AMQP.

%package common
Summary:        Shared code for Qpid Python language bindings
Group:          Development/Libraries/Python

%description common
Shared code for Qpid Python language bindings.

%prep
%setup -q -n qpid-python-%{version}
cd ..

%build
CFLAGS="%{optflags}" python setup.py build

%install
python setup.py install \
    --skip-build \
    --prefix %{_prefix} \
    --install-purelib %{python_sitelib} \
    --root %{buildroot}

chmod +x %{buildroot}/%{python_sitelib}/qpid/codec.py
chmod +x %{buildroot}/%{python_sitelib}/qpid/tests/codec.py
chmod +x %{buildroot}/%{python_sitelib}/qpid/reference.py
chmod +x %{buildroot}/%{python_sitelib}/qpid/managementdata.py
chmod +x %{buildroot}/%{python_sitelib}/qpid/disp.py

%files
%defattr(-,root,root,-)
%doc README.txt
%doc LICENSE.txt
%{_bindir}/qpid-python-test
%{python_sitelib}/qpid
%exclude %{python_sitelib}/qpid/*.py*
%exclude %{python_sitelib}/qpid/specs
%exclude %{python_sitelib}/qpid/tests
%if "%{python_version}" >= "2.6"
%{python_sitelib}/qpid_python-*.egg-info
%endif

%files common
%defattr(-,root,root,-)
%doc examples/README.txt
%doc examples
%{python_sitelib}/mllib
%{python_sitelib}/qpid/*.py*
%{python_sitelib}/qpid/specs

%changelog
openSUSE Build Service is sponsored by