use python-config, strip python version from demos, change [PyRit] to [pyrit] -- should use unix name everywhere pyrit
authorRadek Brich <radek.brich@devl.cz>
Mon, 29 Oct 2007 15:50:17 +0100
branchpyrit
changeset 1 e74bf781067e
parent 0 3547b885df7e
child 2 ce23c7deb2d3
use python-config, strip python version from demos, change [PyRit] to [pyrit] -- should use unix name everywhere
Makefile
demos/demo.py
demos/spheres_ao.py
demos/spheres_shadow.py
demos/triangles_monkey.py
demos/triangles_sphere.py
src/raytracermodule.cc
--- a/Makefile	Thu Oct 25 16:40:22 2007 +0200
+++ b/Makefile	Mon Oct 29 15:50:17 2007 +0100
@@ -6,7 +6,7 @@
   LDFLAGS+=-L"C:\Program Files\Python25\libs" -lpython25
   MODULENAME=raytracer.pyd
 else
-  CCFLAGS+=-fPIC -I/usr/include/python2.4
+  CCFLAGS+=-fPIC `python-config --includes`
   MODULENAME=raytracermodule.so
 endif
 
--- a/demos/demo.py	Thu Oct 25 16:40:22 2007 +0200
+++ b/demos/demo.py	Mon Oct 29 15:50:17 2007 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
 
 import sys
 sys.path.append("../")
--- a/demos/spheres_ao.py	Thu Oct 25 16:40:22 2007 +0200
+++ b/demos/spheres_ao.py	Mon Oct 29 15:50:17 2007 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
 
 import sys
 sys.path.append("../")
--- a/demos/spheres_shadow.py	Thu Oct 25 16:40:22 2007 +0200
+++ b/demos/spheres_shadow.py	Mon Oct 29 15:50:17 2007 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
 
 import sys
 sys.path.append("../")
--- a/demos/triangles_monkey.py	Thu Oct 25 16:40:22 2007 +0200
+++ b/demos/triangles_monkey.py	Mon Oct 29 15:50:17 2007 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
 
 import sys
 sys.path.append("../")
--- a/demos/triangles_sphere.py	Thu Oct 25 16:40:22 2007 +0200
+++ b/demos/triangles_sphere.py	Mon Oct 29 15:50:17 2007 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
 
 import sys
 sys.path.append("../")
--- a/src/raytracermodule.cc	Thu Oct 25 16:40:22 2007 +0200
+++ b/src/raytracermodule.cc	Mon Oct 29 15:50:17 2007 +0100
@@ -7,6 +7,7 @@
  */
 
 #include <Python.h>
+
 #include <vector>
 #include "scene.h"
 #include "raytracer.h"
@@ -446,7 +447,7 @@
 	if (!PyArg_ParseTuple(args, "(ii)", &w, &h))
 		return NULL;
 
-	printf("[PyRit] Raytracing...\n");
+	printf("[pyrit] Raytracing...\n");
 	data = ((RaytracerObject *)self)->raytracer->render(w, h);
 	if (!data) {
 		Py_INCREF(Py_None);
@@ -454,7 +455,7 @@
 	}
 
 	// convert data to char
-	printf("[PyRit] Converting image data (float to char)...\n");
+	printf("[pyrit] Converting image data (float to char)...\n");
 	chardata = (char *) malloc(w*h*3);
 	float *d = data;
 	for (char *c = chardata; c != chardata + w*h*3; c++, d++) {
@@ -466,7 +467,7 @@
 	free(data);
 	o = Py_BuildValue("s#", chardata, w*h*3);
 	free(chardata);
-	printf("[PyRit] Done.\n");
+	printf("[pyrit] Done.\n");
 	return o;
 }