update pycairo version to 1.19.1

This commit is contained in:
eaglegai 2020-07-29 11:36:15 +08:00
parent a793924a7e
commit f093929fdf
4 changed files with 84 additions and 1 deletions

View File

@ -0,0 +1,74 @@
From 7c376b485111183414ba4cb8a567bee8e56c888d Mon Sep 17 00:00:00 2001
From: eaglegai <eaglegai@163.com>
Date: Wed, 29 Jul 2020 10:44:33 +0800
Subject: [PATCH] fix building error with python2
---
docs/conf.py | 1 +
meson.build | 4 ++--
setup.py | 8 +++++---
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index b3925ee..be0a886 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -5,6 +5,7 @@ extensions = [
'sphinx.ext.extlinks',
]
intersphinx_mapping = {
+ 'python': ('https://docs.python.org/2', None),
'python3': ('https://docs.python.org/3', None),
}
source_suffix = '.rst'
diff --git a/meson.build b/meson.build
index c724096..25e2b1a 100644
--- a/meson.build
+++ b/meson.build
@@ -14,8 +14,8 @@ pymod = import('python')
python = pymod.find_installation(get_option('python'))
pyver = python.language_version()
-if pyver.version_compare('< 3.5')
- error('Requires Python >= 3.5')
+if pyver.version_compare('< 2.7') or (pyver.version_compare('>= 3.0') and pyver.version_compare('< 3.5'))
+ error('Requires Python 2.7 or Python >= 3.5')
endif
configure_file(
diff --git a/setup.py b/setup.py
index 2046553..580260f 100755
--- a/setup.py
+++ b/setup.py
@@ -531,8 +531,8 @@ class build(du_build):
def main():
- if sys.version_info[0] < 3:
- raise Exception("Python 2 no longer supported")
+# if sys.version_info[0] < 3:
+# raise Exception("Python 2 no longer supported")
cairo_ext = Extension(
name='cairo._cairo',
@@ -600,6 +600,8 @@ def main():
},
classifiers=[
'Operating System :: OS Independent',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
@@ -612,7 +614,7 @@ def main():
'License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)',
],
cmdclass=cmdclass,
- python_requires='>=3.5, <4',
+ python_requires='>=2.7, <4',
)
--
1.8.3.1

Binary file not shown.

BIN
pycairo-1.19.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,11 +1,14 @@
Name: pycairo Name: pycairo
Version: 1.18.2 Version: 1.19.1
Release: 1 Release: 1
Summary: A python module providing bindings for the cairo graphics library Summary: A python module providing bindings for the cairo graphics library
License: MPLv1.1 or LGPLv2 License: MPLv1.1 or LGPLv2
URL: https://cairographics.org/pycairo URL: https://cairographics.org/pycairo
Source0: https://github.com/pygobject/pycairo/releases/download/v%{version}/pycairo-%{version}.tar.gz Source0: https://github.com/pygobject/pycairo/releases/download/v%{version}/pycairo-%{version}.tar.gz
#Just a temporary patch,after whole branch removing python2,remove it
Patch0001: fix-building-error-with-python2.patch
BuildRequires: cairo-devel gcc pkgconfig python2-devel python2-pytest python3-devel python3-pytest BuildRequires: cairo-devel gcc pkgconfig python2-devel python2-pytest python3-devel python3-pytest
%description %description
@ -85,6 +88,12 @@ in order to interoperate with py3cairo.
%{_libdir}/pkgconfig/py*.pc %{_libdir}/pkgconfig/py*.pc
%changelog %changelog
* Wed Jul 29 2020 gaihuiying <gaihuiying1@huawei.com> - 1.19.1-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update pycairo version to 1.19.1
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.18.2-1 * Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.18.2-1
- update to 1.18.2 - update to 1.18.2