--- setup.py.orig 2015-12-02 02:03:03 +++ setup.py 2023-12-17 18:57:29 @@ -1,7 +1,7 @@ # Setup for gdmodule 0.50 and later from distutils.core import setup, Extension -import os, glob, sys, string, commands +import os, glob, sys, string, subprocess # version of this gdmodule package this_version = "0.59" @@ -40,6 +40,7 @@ # Unixoid OS's I will just look for the usual suspects. libdirs = dirtest([ + "PREFIX/lib", "/usr/local/lib", "/sw/lib", "/usr/lib", "/usr/lib/i386-linux-gnu", "/usr/lib/x86_64-linux-gnu", "/usr/lib/X11", "/usr/X11R6/lib", @@ -47,7 +48,7 @@ ]) try: - exotic_libdir = commands.getoutput("gdlib-config --libdir"), + exotic_libdir = subprocess.check_output(["gdlib-config", "--libdir"]), libdirs += exotic_libdir except: pass @@ -55,13 +56,14 @@ # include_dirs are also non-portable; same trick here. incdirs = dirtest([ + "PREFIX/include", "/usr/local/include", "/sw/include", "/usr/include", "/usr/include/X11", "/usr/X11R6/include", "/opt/gnome/include", ]) try: - exotic_incdir = commands.getoutput("gdlib-config --includedir"), + exotic_incdir = subprocess.check_output(["gdlib-config", "--includedir"]), incdirs += exotic_incdir except: pass @@ -93,7 +95,7 @@ if "gd" not in libs: print "Can't find GD library." - sys.exit(0) + sys.exit(1) if "ttf" in libs and "freetype" in libs: remove("ttf", libs)