#
# Based on
# http://git.fedorahosted.org/git/?p=pycups.git;a=commit;h=fefe4d6b50c5f1c0bcafa40da60170f42217de82
# https://fedorahosted.org/pycups/ticket/14
#
diff -Naur pycups-1.9.49.orig/Makefile pycups-1.9.49/Makefile
--- pycups-1.9.49.orig/Makefile	2010-04-28 12:25:05.016799280 -0700
+++ pycups-1.9.49/Makefile	2010-04-28 12:34:20.275799057 -0700
@@ -1,5 +1,4 @@
 NAME=pycups
-VERSION=1.9.49
 
 SOURCES=cupsmodule.c cupsconnection.c cupsppd.c cupsipp.c setup.py \
 	cupsppd.h cupsipp.h cupsconnection.h cupsmodule.h
@@ -9,7 +8,7 @@
 	COPYING NEWS README TODO ChangeLog
 
 cups.so: $(SOURCES)
-	CFLAGS=-DVERSION=\\\"$(VERSION)\\\" python setup.py build
+	python setup.py build
 	mv build/lib*/$@ .
 
 doc:	cups.so
diff -Naur pycups-1.9.49.orig/setup.py pycups-1.9.49/setup.py
--- pycups-1.9.49.orig/setup.py	2010-04-28 12:25:05.016799280 -0700
+++ pycups-1.9.49/setup.py	2010-04-28 12:35:39.438674099 -0700
@@ -3,4 +3,5 @@
        ext_modules=[Extension("cups",
                               ["cupsmodule.c", "cupsconnection.c",
                                "cupsppd.c", "cupsipp.c"],
-                              libraries=["cups"])])
+                              libraries=["cups"],
+                              define_macros=[("VERSION", '"1.9.49"')])])
