[Python-modules-commits] [python-gd] 01/01: fix patched files
Julián Moreno Patiño
julian at moszumanska.debian.org
Thu Sep 15 21:41:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
julian pushed a commit to branch master
in repository python-gd.
commit e493d3dcfe9de3ed6c327fc7b3b02c9a5bfec046
Author: Julián Moreno Patiño <julian at debian.org>
Date: Thu Sep 15 16:35:07 2016 -0500
fix patched files
---
Setup.py | 18 ++----------------
_gdmodule.c | 2 +-
demo/gddemo.py | 24 ++++--------------------
3 files changed, 7 insertions(+), 37 deletions(-)
diff --git a/Setup.py b/Setup.py
index 17da910..f9ceb8e 100644
--- a/Setup.py
+++ b/Setup.py
@@ -36,20 +36,6 @@ def remove(itm, lst):
if lst[i] == itm:
del lst[i]
-# Add multiarch paths
-
-mult_lib = []
-mult_inc = []
-
-try:
- cmd = os.popen('dpkg-architecture -qDEB_HOST_MULTIARCH')
- multiarch_path_component = cmd.readline().strip()
- mult_lib = ['/usr/lib/'+multiarch_path_component]
- mult_inc = ['/usr/include/'+multiarch_path_component]
- cmd.close()
-except:
- print "Can not import multiarch name"
-
# library_dirs option is rather non-portable, but since I am targetting
# Unixoid OS's I will just look for the usual suspects.
@@ -58,7 +44,7 @@ libdirs = dirtest([
"/usr/lib/i386-linux-gnu", "/usr/lib/x86_64-linux-gnu",
"/usr/lib/X11", "/usr/X11R6/lib",
"/opt/gnome/lib",
-]+mult_lib)
+])
try:
exotic_libdir = commands.getoutput("gdlib-config --libdir"),
@@ -72,7 +58,7 @@ incdirs = dirtest([
"/usr/local/include", "/sw/include", "/usr/include",
"/usr/include/X11", "/usr/X11R6/include",
"/opt/gnome/include",
-]+mult_inc)
+])
try:
exotic_incdir = commands.getoutput("gdlib-config --includedir"),
diff --git a/_gdmodule.c b/_gdmodule.c
index bcf72c4..798f208 100644
--- a/_gdmodule.c
+++ b/_gdmodule.c
@@ -165,7 +165,7 @@ typedef struct i_o {
// 2.0.22 replaces gdFontTinyRep with gdFontGetTiny, and so on
-typedef gdFontPtr (*ptrGetFontFunction)(void);
+typedef gdFontPtr (*ptrGetFontFunction)();
typedef struct {
char *name;
ptrGetFontFunction func;
diff --git a/demo/gddemo.py b/demo/gddemo.py
index 1df5d93..62bd50d 100644
--- a/demo/gddemo.py
+++ b/demo/gddemo.py
@@ -2,26 +2,9 @@
import gd, os, cStringIO, urllib2
-fontlist = [
- '/usr/share/fonts/truetype/freefont/FreeSerif.ttf',
- '/usr/share/fonts/truetype/freefont/FreeSans.ttf',
- '/usr/share/fonts/truetype/freefont/FreeMono.ttf'
- ]
-
-fontpath = '.'
-for f in fontlist:
- if os.path.exists(f):
- fontpath = fontpath + ':' + os.path.dirname(f)
- FONT = os.path.abspath(f)
- break
-
-os.environ["GDFONTPATH"] = "fontpath"
-
-try:
- FONT
-except NameError:
- print "no fonts found"
- sys.exit(1)
+os.environ["GDFONTPATH"] = "."
+
+FONT = "Pacifico"
def simple():
im = gd.image((200, 200))
@@ -61,3 +44,4 @@ def simple():
print "GNU Image Size:", im.size()
simple()
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-gd.git
More information about the Python-modules-commits
mailing list