python-pycairo/python-pycairo.spec
Todd R 3a28e29992 Accepting request 704065 from home:TheBlackCat:branches:devel:languages:python
- Update to version 1.18.1- Rename to python-pycario to conform to python package naming guidelines
- Expand summaries and descriptions.

OBS-URL: https://build.opensuse.org/request/show/704065
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycairo?expand=0&rev=1
2019-05-19 16:52:28 +00:00

110 lines
3.4 KiB
RPMSpec

#
# spec file for package python-pycairo
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-pycairo
Version: 1.18.1
Release: 0
Summary: Python Bindings for Cairo
License: LGPL-2.1-or-later OR MPL-1.1
Group: Development/Libraries/Python
Url: http://www.cairographics.org/pycairo
Source: https://github.com/pygobject/pycairo/releases/download/v%{version}/pycairo-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: cairo-devel >= 1.13.1
BuildRequires: python-rpm-macros
Provides: python-cario = %{version}
Obsoletes: python-cario < %{version}
%ifpython2
Provides: %{oldpython}-cario = %{version}
Obsoletes: %{oldpython}-cario < %{version}
%endif
%python_subpackages
%description
Pycairo is a Python module providing bindings for the cairo graphics library.
%package devel
Summary: Development files for the Cairo Python bindings
Group: Development/Libraries/C and C++
Requires: python-pycairo = %{version}
Requires: python-pycairo-common-devel = %{version}
Requires: python-devel
Provides: python-cario-devel = %{version}
Obsoletes: python-cario-devel < %{version}
%ifpython2
Provides: %{oldpython}-cario-devel = %{version}
Obsoletes: %{oldpython}-cario-devel < %{version}
%endif
%description devel
Pycairo is a Python module providing bindings for the cairo graphics library.
This package provides the development files needed to build
packages that depen on Pycairo.
%package -n %{name}-common-devel
Summary: Headers for the Cairo Python bindings
Group: Development/Libraries/C and C++
Provides: %{python_module pycairo-common-devel = %{version}}
Provides: %{python_module cairo-common-devel = %{version}}
Obsoletes: %{python_module cairo-common-devel < %{version}}
Requires: cairo-devel
%description -n %{name}-common-devel
Pycairo is a Python module providing bindings for the cairo graphics library.
This package provides the headers and development files needed to build
packages that depen on Pycairo.
%prep
%setup -n pycairo-%{version}
%build
%python_build
%install
%python_install
%check
%python_exec setup.py test
%files %{python_files}
%doc NEWS docs
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
%{python_sitearch}/cairo/
%{python_sitearch}/pycairo-*.egg-info
%files %{python_files devel}
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
%ifpython2
%{_libdir}/pkgconfig/pycairo.pc
%endif
%ifpython3
%{_libdir}/pkgconfig/py3cairo.pc
%endif
%files -n %{name}-common-devel
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
%{_includedir}/pycairo/
%changelog