| |
@@ -1,20 +1,19 @@
|
| |
Name: python2-cairo
|
| |
Version: 1.18.2
|
| |
- Release: 8%{?dist}
|
| |
+ Release: 9%{?dist}
|
| |
Summary: Python 2 bindings for the cairo library
|
| |
|
| |
License: MPLv1.1 or LGPLv2
|
| |
URL: http://cairographics.org/pycairo
|
| |
Source0: https://github.com/pygobject/pycairo/releases/download/v%{version}/pycairo-%{version}.tar.gz
|
| |
|
| |
- # This package has a FESCo exception to use Python 2, for GIMP
|
| |
- # https://pagure.io/fesco/issue/2238
|
| |
-
|
| |
BuildRequires: cairo-devel
|
| |
BuildRequires: gcc
|
| |
BuildRequires: pkgconfig
|
| |
- BuildRequires: python2-devel
|
| |
- BuildRequires: python2-setuptools
|
| |
+
|
| |
+ # This package has a FESCo exception to use Python 2, for GIMP
|
| |
+ # https://pagure.io/fesco/issue/2238
|
| |
+ BuildRequires: python2.7
|
| |
|
| |
%{?python_provide:%python_provide python2-cairo}
|
| |
# Renamed in F27
|
| |
@@ -47,7 +46,32 @@
|
| |
%install
|
| |
%py2_install
|
| |
|
| |
- # No python2-pytest, no %%check
|
| |
+ # %%python2_egg_path was a directory in previous builds, because setuptools were used.
|
| |
+ # Before the version is bumped and this path changed, we need to preserve the directory to avoid:
|
| |
+ # https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
|
| |
+ %global python2_egg_path %{python2_sitearch}/pycairo-%{version}-py%{python2_version}.egg-info
|
| |
+
|
| |
+ %if "%{version}" == "1.18.2"
|
| |
+ mv %{buildroot}%{python2_egg_path} PKG-INFO
|
| |
+ mkdir %{buildroot}%{python2_egg_path}
|
| |
+ mv PKG-INFO %{buildroot}%{python2_egg_path}
|
| |
+ echo cairo > %{buildroot}%{python2_egg_path}/top_level.txt
|
| |
+ # dependency_links.txt and SOURCES.txt were also present, but they don't seem mandatory
|
| |
+ %endif
|
| |
+
|
| |
+
|
| |
+ %check
|
| |
+ # No python2-pytest, no tests
|
| |
+
|
| |
+ %if "%{version}" == "1.18.2"
|
| |
+ # assert the Python 2 egg info is a directory to preserve upgrade path
|
| |
+ test -d %{buildroot}%{python2_egg_path}
|
| |
+ %else
|
| |
+ # assert the Python 2 egg info is *not* a directory to be able to eventually
|
| |
+ # drop all the egg-info mangling from this spec
|
| |
+ test -f %{buildroot}%{python2_egg_path}
|
| |
+ %endif
|
| |
+
|
| |
|
| |
%files
|
| |
%license COPYING*
|
| |
@@ -60,6 +84,9 @@
|
| |
%{_libdir}/pkgconfig/pycairo.pc
|
| |
|
| |
%changelog
|
| |
+ * Wed Jun 23 2021 Miro Hrončok <mhroncok@redhat.com> - 1.18.2-9
|
| |
+ - Drop optional build dependency on python2-setuptools
|
| |
+
|
| |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.2-8
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
| |
|
| |
While we are on version 1.18.2 we need an ugly scriptlet to replace an egg-info
directory with a file.
If a new version ever comes out, we can get rid of it.
No need to merge yet, I plan to open a discussion about retiring python2-setuptools on the devel mailing list.