2019-05-19 18:52:28 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-pycairo
|
|
|
|
#
|
2024-03-22 22:01:17 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-05-19 18:52:28 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-05-03 16:42:41 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-05-19 18:52:28 +02:00
|
|
|
%define oldpython python
|
|
|
|
Name: python-pycairo
|
2024-03-22 22:01:17 +01:00
|
|
|
Version: 1.26.0
|
2019-05-19 18:52:28 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Python Bindings for Cairo
|
|
|
|
License: LGPL-2.1-or-later OR MPL-1.1
|
2019-10-07 11:08:28 +02:00
|
|
|
URL: https://github.com/pygobject/pycairo
|
2022-09-15 09:47:38 +02:00
|
|
|
Source: %{url}/releases/download/v%{version}/pycairo-%{version}.tar.gz
|
|
|
|
|
2019-05-19 18:52:28 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2020-03-16 10:47:23 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-12-03 17:51:03 +01:00
|
|
|
BuildRequires: cairo-devel >= 1.15.10
|
2022-07-18 10:27:27 +02:00
|
|
|
BuildRequires: fdupes
|
2019-05-19 18:52:28 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-05-21 18:29:43 +02:00
|
|
|
Provides: python-cairo = %{version}
|
|
|
|
Obsoletes: python-cairo < %{version}
|
2019-05-19 18:52:28 +02:00
|
|
|
%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
|
2019-10-07 11:08:28 +02:00
|
|
|
Requires: python-devel
|
2019-05-19 18:52:28 +02:00
|
|
|
Requires: python-pycairo = %{version}
|
|
|
|
Requires: python-pycairo-common-devel = %{version}
|
2019-05-21 18:29:43 +02:00
|
|
|
Provides: python-cairo-devel = %{version}
|
|
|
|
Obsoletes: python-cairo-devel < %{version}
|
2019-05-19 18:52:28 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Pycairo is a Python module providing bindings for the cairo graphics library.
|
|
|
|
|
|
|
|
This package provides the development files needed to build
|
2020-12-03 17:51:03 +01:00
|
|
|
packages that depend on Pycairo.
|
2019-05-19 18:52:28 +02:00
|
|
|
|
2019-05-21 22:23:40 +02:00
|
|
|
%package -n python-pycairo-common-devel
|
2019-05-19 18:52:28 +02:00
|
|
|
Summary: Headers for the Cairo Python bindings
|
2019-10-07 11:08:28 +02:00
|
|
|
Requires: cairo-devel
|
2019-05-19 18:52:28 +02:00
|
|
|
Provides: %{python_module cairo-common-devel = %{version}}
|
2019-10-07 11:08:28 +02:00
|
|
|
Provides: %{python_module pycairo-common-devel = %{version}}
|
2019-05-19 18:52:28 +02:00
|
|
|
Obsoletes: %{python_module cairo-common-devel < %{version}}
|
2021-08-12 13:49:08 +02:00
|
|
|
Provides: %{python_module cairo-devel = %{version}}
|
|
|
|
Obsoletes: %{python_module cairo-devel < %{version}}
|
2019-05-21 22:23:40 +02:00
|
|
|
Provides: python-cairo-common-devel = %{version}
|
|
|
|
Obsoletes: python-cairo-common-devel < %{version}
|
2019-05-19 18:52:28 +02:00
|
|
|
|
2019-05-21 22:23:40 +02:00
|
|
|
%description -n python-pycairo-common-devel
|
2019-05-19 18:52:28 +02:00
|
|
|
Pycairo is a Python module providing bindings for the cairo graphics library.
|
|
|
|
|
|
|
|
This package provides the headers and development files needed to build
|
2020-12-03 17:51:03 +01:00
|
|
|
packages that depend on Pycairo.
|
2019-05-19 18:52:28 +02:00
|
|
|
|
|
|
|
%prep
|
2022-09-15 09:47:38 +02:00
|
|
|
%autosetup -n pycairo-%{version} -p1
|
2019-05-19 18:52:28 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2022-07-18 10:27:27 +02:00
|
|
|
# Incorrectly installed by a python38-setuptools vendored distutils
|
|
|
|
# which does not play well with the distro patched python38.
|
|
|
|
# Later flavors installed the correct files into lib64 as well
|
|
|
|
if [ "%{_libdir}" != "%{_prefix}/lib" -a -d %{buildroot}%{_prefix}/lib/pkgconfig ]; then
|
|
|
|
rm -r %{buildroot}%{_prefix}/lib/pkgconfig
|
|
|
|
fi
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2019-05-19 18:52:28 +02:00
|
|
|
|
|
|
|
%check
|
2020-12-03 17:51:03 +01:00
|
|
|
# this is not the deprecated setuptools test call but a custom setup compiling stuff and running pytest
|
2019-05-19 18:52:28 +02:00
|
|
|
%python_exec setup.py test
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc NEWS docs
|
|
|
|
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
|
|
|
|
%{python_sitearch}/cairo/
|
2020-12-03 17:51:03 +01:00
|
|
|
%exclude %{python_sitearch}/cairo/include
|
2019-05-19 18:52:28 +02:00
|
|
|
%{python_sitearch}/pycairo-*.egg-info
|
|
|
|
|
|
|
|
%files %{python_files devel}
|
|
|
|
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
|
2020-12-03 17:51:03 +01:00
|
|
|
%{python_sitearch}/cairo/include
|
2019-05-19 18:52:28 +02:00
|
|
|
|
2019-05-21 22:23:40 +02:00
|
|
|
%files -n python-pycairo-common-devel
|
2019-05-19 18:52:28 +02:00
|
|
|
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
|
|
|
|
%{_includedir}/pycairo/
|
2020-12-03 17:51:03 +01:00
|
|
|
%{_libdir}/pkgconfig/py3cairo.pc
|
2019-05-19 18:52:28 +02:00
|
|
|
|
|
|
|
%changelog
|