[python-mapnik] 05/06: Add patch to use system fonts in setup.py.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Oct 15 08:38:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository python-mapnik.

commit 9f5b8b8bdeee9507e2bd7fdcda23fb89d62f268d
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Oct 15 00:10:54 2015 +0200

    Add patch to use system fonts in setup.py.
---
 debian/patches/series             |  1 +
 debian/patches/system-fonts.patch | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ad9dfc6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+system-fonts.patch
diff --git a/debian/patches/system-fonts.patch b/debian/patches/system-fonts.patch
new file mode 100644
index 0000000..d52c3b4
--- /dev/null
+++ b/debian/patches/system-fonts.patch
@@ -0,0 +1,22 @@
+Description: Add support for system fonts to setup.py.
+ The same is supported in build.py if no mapnik/paths.py exists.
+Author: Bas Couwenberg <sebastic at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799473#10
+Forwarded: https://github.com/mapnik/python-mapnik/pull/59
+
+--- a/setup.py
++++ b/setup.py
+@@ -167,8 +167,12 @@ elif create_paths:
+ 
+ if create_paths:
+     f_paths.write("inputpluginspath = os.path.join(mapniklibpath,'input')\n")
++    if os.environ.get('SYSTEM_FONTS'):
++        font_path = "os.path.normpath('%s')" % os.environ.get('SYSTEM_FONTS')
++    else:
++        font_path = "os.path.join(mapniklibpath,'fonts')"
+     f_paths.write(
+-        "fontscollectionpath = os.path.join(mapniklibpath,'fonts')\n")
++        "fontscollectionpath = " + font_path + "\n")
+     f_paths.write(
+         "__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]\n")
+     f_paths.close()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-mapnik.git



More information about the Pkg-grass-devel mailing list