[packages/python3-pycairo] Update to 1.15.3
megabajt
megabajt at pld-linux.org
Sat Oct 28 19:52:45 CEST 2017
commit e894d14423250e0057d22df2d5474d13e78b41de
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date: Sat Oct 28 19:52:02 2017 +0200
Update to 1.15.3
- removed obsolete pycairo-setup.patch
pycairo-setup.patch | 131 ---------------------------------------------------
python3-pycairo.spec | 20 ++++----
2 files changed, 9 insertions(+), 142 deletions(-)
---
diff --git a/python3-pycairo.spec b/python3-pycairo.spec
index c5a022d..b8a6136 100644
--- a/python3-pycairo.spec
+++ b/python3-pycairo.spec
@@ -1,16 +1,15 @@
Summary: Python 3.x Cairo bindings
Summary(pl.UTF-8): Dowiązania Pythona 3.x dla Cairo
Name: python3-pycairo
-Version: 1.10.0
-Release: 10
+Version: 1.15.3
+Release: 1
License: LGPL v3
Group: Libraries
-Source0: http://cairographics.org/releases/pycairo-%{version}.tar.bz2
-# Source0-md5: e6fd3f2f1e6a72e0db0868c4985669c5
-Patch0: pycairo-setup.patch
+Source0: https://github.com/pygobject/pycairo/releases/download/v%{version}/pycairo-%{version}.tar.gz
+# Source0-md5: 7390cd413271fe5569f6eef73d72bf7a
URL: http://cairographics.org/
BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: cairo-devel >= 1.10.0
+BuildRequires: cairo-devel >= 1.13.1
BuildRequires: pkgconfig
BuildRequires: python3 >= 3.1
BuildRequires: python3-devel >= 3.1
@@ -19,7 +18,7 @@ BuildRequires: python3-devel >= 3.1
# not released yet
#BuildRequires: python-xpyb >= 1.3
BuildRequires: rpm-pythonprov
-Requires: cairo >= 1.10.0
+Requires: cairo >= 1.13.1
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -33,7 +32,7 @@ Summary: Development files for pycairo
Summary(pl.UTF-8): Pliki programistyczne pycairo
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: cairo-devel >= 1.10.0
+Requires: cairo-devel >= 1.13.1
%description devel
Development files for pycairo.
@@ -55,7 +54,6 @@ Przykładowe programy w Pythonie używające Cairo.
%prep
%setup -q -n pycairo-%{version}
-%patch0 -p1
%ifarch x32
%{__sed} -i -e 's/lib64/libx32/g' setup.py
@@ -77,7 +75,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS COPYING NEWS README
+%doc COPYING NEWS README.rst
%dir %{py3_sitedir}/cairo
%attr(755,root,root) %{py3_sitedir}/cairo/_cairo.cpython-*.so
%{py3_sitedir}/cairo/*.py
@@ -87,7 +85,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
%{_includedir}/pycairo
-%{_pkgconfigdir}/py3cairo.pc
+%{_npkgconfigdir}/py3cairo.pc
%files examples
%defattr(644,root,root,755)
diff --git a/pycairo-setup.patch b/pycairo-setup.patch
deleted file mode 100644
index 1a6cb1d..0000000
--- a/pycairo-setup.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-diff -urN pycairo-1.10.0.orig/setup.py pycairo-1.10.0/setup.py
---- pycairo-1.10.0.orig/setup.py 1970-01-01 00:00:00.000000000 +0000
-+++ pycairo-1.10.0/setup.py 2013-07-16 05:59:25.414054186 +0000
-@@ -0,0 +1,127 @@
-+#!/usr/bin/env python
-+
-+import distutils.core as dic
-+import distutils.dir_util as dut
-+import distutils.file_util as fut
-+import distutils.sysconfig as dsy
-+import io
-+import os
-+import subprocess
-+import sys
-+
-+pycairo_version = '1.10.0'
-+cairo_version_required = '1.10.1'
-+python_version_required = (3,1)
-+pkgconfig_file = 'py3cairo.pc'
-+config_file = 'src/config.h'
-+
-+LIBDIR = os.uname ()[-1] == 'x86_64' and 'lib64' or 'lib'
-+
-+def call(command):
-+ pipe = subprocess.Popen(command, shell=True,
-+ stdout=subprocess.PIPE,
-+ stderr=subprocess.PIPE)
-+ pipe.wait()
-+ return pipe
-+
-+def pkg_config_version_check(pkg, version):
-+ check = '%s >= %s' % (pkg, version)
-+ pipe = call("pkg-config --print-errors --exists '%s'" % (check,))
-+ if pipe.returncode == 0:
-+ print(check, ' Successful')
-+ else:
-+ print(check, ' Failed')
-+ raise SystemExit(pipe.stderr.read().decode())
-+
-+def pkg_config_parse(opt, pkg):
-+ check = "pkg-config %s %s" % (opt, pkg)
-+ pipe = call("pkg-config %s %s" % (opt, pkg))
-+ if pipe.returncode != 0:
-+ print(check, ' Failed')
-+ raise SystemExit(pipe.stderr.read().decode())
-+
-+ output = pipe.stdout.read()
-+ output = output.decode() # get the str
-+ opt = opt[-2:]
-+ return [x.lstrip(opt) for x in output.split()]
-+
-+
-+def createPcFile(PcFile):
-+ print('creating %s' % PcFile)
-+ with open(PcFile, 'w') as fo:
-+ fo.write ("""\
-+prefix=%s
-+
-+Name: Pycairo
-+Description: Python 3 bindings for cairo
-+Version: %s
-+Requires: cairo
-+Cflags: -I${prefix}/include/pycairo
-+Libs:
-+""" % (sys.prefix, pycairo_version)
-+ )
-+
-+def createConfigFile(ConfigFile):
-+ print('creating %s' % ConfigFile)
-+ v = pycairo_version.split('.')
-+
-+ with open(ConfigFile, 'w') as fo:
-+ fo.write ("""\
-+// Configuration header created by setup.py - do not edit
-+#ifndef _CONFIG_H
-+#define _CONFIG_H 1
-+
-+#define PYCAIRO_VERSION_MAJOR %s
-+#define PYCAIRO_VERSION_MINOR %s
-+#define PYCAIRO_VERSION_MICRO %s
-+#define VERSION "%s"
-+
-+#endif // _CONFIG_H
-+""" % (v[0], v[1], v[2], pycairo_version)
-+ )
-+
-+
-+if sys.version_info < python_version_required:
-+ raise SystemExit('Error: Python >= %s is required' %
-+ (python_version_required,))
-+
-+pkg_config_version_check ('cairo', cairo_version_required)
-+if sys.platform == 'win32':
-+ runtime_library_dirs = []
-+else:
-+ runtime_library_dirs = pkg_config_parse('--libs-only-L', 'cairo')
-+
-+createPcFile(pkgconfig_file)
-+createConfigFile(config_file)
-+
-+
-+cairo = dic.Extension(
-+ name = 'cairo._cairo',
-+ sources = ['src/cairomodule.c',
-+ 'src/context.c',
-+ 'src/font.c',
-+ 'src/matrix.c',
-+ 'src/path.c',
-+ 'src/pattern.c',
-+ 'src/surface.c',
-+ ],
-+ include_dirs = pkg_config_parse('--cflags-only-I', 'cairo'),
-+ library_dirs = pkg_config_parse('--libs-only-L', 'cairo'),
-+ libraries = pkg_config_parse('--libs-only-l', 'cairo'),
-+ runtime_library_dirs = runtime_library_dirs,
-+ )
-+
-+dic.setup(
-+ name = "pycairo",
-+ version = pycairo_version,
-+ description = "python interface for cairo",
-+ ext_modules = [cairo],
-+ package_dir = {'cairo': 'src'},
-+ packages = ['cairo'],
-+ data_files = [
-+ ('include/pycairo', ['src/py3cairo.h']),
-+ (LIBDIR + '/pkgconfig', [pkgconfig_file]),
-+ (os.path.join(dsy.get_python_lib(True, False, prefix=sys.prefix), 'cairo'),
-+ ['src/__init__.py']),
-+ ],
-+ )
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pycairo.git/commitdiff/e894d14423250e0057d22df2d5474d13e78b41de
More information about the pld-cvs-commit
mailing list