From 3f718718c7f9631a0122f5a61d5326cb63980e26 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 6 Dec 2015 01:33:40 +0100 Subject: [PATCH] - fix installing python bindings - rel 8 --- mapnik.spec | 4 +++- python-install.patch | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 python-install.patch diff --git a/mapnik.spec b/mapnik.spec index d67f452..7a2c9dd 100644 --- a/mapnik.spec +++ b/mapnik.spec @@ -2,7 +2,7 @@ Summary: Toolkit for developing GIS (Geographic Information Systems) applications Name: mapnik Version: 2.2.0 -Release: 7 +Release: 8 License: LGPL v2.1 Group: Applications Source0: https://github.com/mapnik/mapnik/archive/v%{version}.tar.gz @@ -10,6 +10,7 @@ Source0: https://github.com/mapnik/mapnik/archive/v%{version}.tar.gz Patch0: %{name}-boost_lib_names.patch Patch1: mapnik-boost-megadiff.diff Patch2: %{name}-build.patch +Patch3: python-install.patch URL: http://mapnik.org/ BuildRequires: boost-devel BuildRequires: boost-python-devel @@ -85,6 +86,7 @@ Statyczna biblioteka Mapnik. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build %scons \ diff --git a/python-install.patch b/python-install.patch new file mode 100644 index 0000000..a0c9cab --- /dev/null +++ b/python-install.patch @@ -0,0 +1,14 @@ +--- mapnik-2.2.0/SConstruct~ 2015-12-06 00:40:11.000000000 +0100 ++++ mapnik-2.2.0/SConstruct 2015-12-06 01:18:15.465765196 +0100 +@@ -1502,9 +1502,9 @@ + + # Note: we use the plat_specific argument here to make sure to respect the arch-specific site-packages location + if py3: +- site_packages = '''%s -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True))"''' % env['PYTHON'] ++ site_packages = '''%s -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True,prefix=\'/usr\'))"''' % env['PYTHON'] + else: +- site_packages = '''%s -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True)"''' % env['PYTHON'] ++ site_packages = '''%s -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True,prefix=\'/usr\')"''' % env['PYTHON'] + env['PYTHON_SITE_PACKAGES'] = call(site_packages) + else: + env['PYTHON_SYS_PREFIX'] = os.popen('''%s -c "import sys; print sys.prefix"''' % env['PYTHON']).read().strip() -- 2.44.0