aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-12-29 21:30:25 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-12-29 21:30:25 +0000
commit09f42a0bf075cb60783111169b8dd5fc23497fae (patch)
tree50db0bdc7bde62767879746945ba1885fe81e4e9 /externals/grill
parent8e5699c83d2a5f5d649a950e94662257a9b8a979 (diff)
""
svn path=/trunk/; revision=1240
Diffstat (limited to 'externals/grill')
-rwxr-xr-xexternals/grill/py/config-pd-darwin.txt17
-rw-r--r--externals/grill/py/config-pd-linux.txt4
-rwxr-xr-xexternals/grill/py/makefile.pd-darwin9
-rw-r--r--externals/grill/py/pd/attr-1.pd64
-rw-r--r--externals/grill/py/readme.txt16
-rw-r--r--externals/grill/py/source/main.h4
6 files changed, 58 insertions, 56 deletions
diff --git a/externals/grill/py/config-pd-darwin.txt b/externals/grill/py/config-pd-darwin.txt
index ff7f6c49..813d82c0 100755
--- a/externals/grill/py/config-pd-darwin.txt
+++ b/externals/grill/py/config-pd-darwin.txt
@@ -7,26 +7,19 @@
# where are the PD header files?
# leave it blank if it is a system directory (like /usr/local/include),
# since gcc 3.2 complains about it
-PDPATH=/usr/local/pd/src
+PDPATH=/usr/local/lib/pd/src
# where is the PD executable?
-PD=/usr/local/pd/bin/pd
+PD=/usr/local/bin/pd
# where do the flext libraries reside?
-FLEXTPATH=/usr/local/pd/flext
-
-# what is the python version?
-PYTHONVER=2.2
-# where are the python header files?
-PYTHONINCLUDE=/usr/include/python${PYTHONVER}
-# where is the python library file?
-PYTHONLIB=/Volumes/Daten/Prog/packs/Python-2.2.2
+FLEXTPATH=/usr/local/lib/pd/flext
# where should flext libraries be built?
TARGDIR=./pd-darwin
# where should the external be installed?
# (leave blank to omit installation)
-INSTPATH=/usr/local/pd/extra
+INSTPATH=/usr/local/lib/pd/extra
# user flags
-# UFLAGS=-O6 -maltivec
+# UFLAGS=-O2 -faltivec -maltivec
diff --git a/externals/grill/py/config-pd-linux.txt b/externals/grill/py/config-pd-linux.txt
index fb83285e..19692e54 100644
--- a/externals/grill/py/config-pd-linux.txt
+++ b/externals/grill/py/config-pd-linux.txt
@@ -29,7 +29,7 @@ TARGDIR=./pd-linux
INSTPATH=/usr/local/lib/pd/extra
# define for shared build
-FLEXT_SHARED=1
+#FLEXT_SHARED=1
# additional user flags
-UFLAGS= \ No newline at end of file
+UFLAGS=
diff --git a/externals/grill/py/makefile.pd-darwin b/externals/grill/py/makefile.pd-darwin
index 47d5bdac..ab63aa97 100755
--- a/externals/grill/py/makefile.pd-darwin
+++ b/externals/grill/py/makefile.pd-darwin
@@ -15,13 +15,12 @@ include ${CONFIG}
FLEXTLIB=${FLEXTPATH}/flext_t.a
# compiler+linker stuff
-INCLUDES=${PDPATH} ${FLEXTPATH} ${PYTHONINCLUDE}
-LIBPATH= ${PYTHONLIB}
+INCLUDES=${PDPATH} ${FLEXTPATH}
FLAGS=-DFLEXT_SYS=2 -DFLEXT_THREADS
-CFLAGS=$(UFLAGS) -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes
+CFLAGS=$(UFLAGS) -Wno-long-double -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes
#CFLAGS=-g
-LIBS=m python${PYTHONVER}
-LDFLAGS=-bundle -bundle_loader ${PD}
+LIBS=m
+LDFLAGS=-bundle -bundle_loader ${PD} -framework Python -framework Carbon
# ---------------------------------------------
# the rest can stay untouched
diff --git a/externals/grill/py/pd/attr-1.pd b/externals/grill/py/pd/attr-1.pd
index 3a870839..f302db7e 100644
--- a/externals/grill/py/pd/attr-1.pd
+++ b/externals/grill/py/pd/attr-1.pd
@@ -1,32 +1,32 @@
-#N canvas 114 127 683 413 12;
-#X obj 224 370 pyext simple ex3;
-#X obj 365 370 print A;
-#X msg 252 180 get tmp;
-#X msg 369 210 get _inlets;
-#X msg 253 204 set tmp 3;
-#X msg 368 234 set _inlets 4;
-#X msg 18 179 dir;
-#X msg 15 282 getattributes;
-#X msg 15 309 getmethods;
-#X msg 18 207 dir+;
-#X text 15 48 This demonstrates the usage of attributes. See the simple.py
-file.;
-#X text 252 161 access a class variable;
-#X text 368 191 try to get/set internal stuff;
-#X text 479 234 (NOT allowed!);
-#X text 16 15 py/pyext - Python script objects \, (C)2003 Thomas Grill
-;
-#X text 16 261 get attributes and methods;
-#X text 51 178 Python module dict;
-#X text 59 208 Python class dict;
-#X text 17 101 All attribute-related methods dump eventual output to
-the attribute outlet (which is the right-most one);
-#X connect 0 1 1 0;
-#X connect 2 0 0 0;
-#X connect 3 0 0 0;
-#X connect 4 0 0 0;
-#X connect 5 0 0 0;
-#X connect 6 0 0 0;
-#X connect 7 0 0 0;
-#X connect 8 0 0 0;
-#X connect 9 0 0 0;
+#N canvas 114 127 687 417 12;
+#X obj 224 370 pyext simple ex3;
+#X obj 392 371 print A;
+#X msg 252 180 get tmp;
+#X msg 369 210 get _inlets;
+#X msg 253 204 set tmp 3;
+#X msg 368 234 set _inlets 4;
+#X msg 18 179 dir;
+#X msg 15 282 getattributes;
+#X msg 15 309 getmethods;
+#X msg 18 207 dir+;
+#X text 15 48 This demonstrates the usage of attributes. See the simple.py
+file.;
+#X text 252 161 access a class variable;
+#X text 368 191 try to get/set internal stuff;
+#X text 479 234 (NOT allowed!);
+#X text 16 15 py/pyext - Python script objects \, (C)2003 Thomas Grill
+;
+#X text 16 261 get attributes and methods;
+#X text 51 178 Python module dict;
+#X text 59 208 Python class dict;
+#X text 17 101 All attribute-related methods dump eventual output to
+the attribute outlet (which is the right-most one);
+#X connect 0 1 1 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X connect 9 0 0 0;
diff --git a/externals/grill/py/readme.txt b/externals/grill/py/readme.txt
index 541b7764..c3ad37a9 100644
--- a/externals/grill/py/readme.txt
+++ b/externals/grill/py/readme.txt
@@ -28,6 +28,7 @@ Access the flexibility of the python language in PD and MaxMSP
PD - Load it as i library with e.g. "pd -lib py -path scripts"
+
Max/MSP - Wait for Windows or a Mach-O MacOSX version. MacOS9 doesn't want it.
@@ -43,8 +44,9 @@ You can send messages to named objects or receive (with pyext) with Python metho
Known bugs:
-There are problems with importing the "time" module, experienced with Python 2.2.2 under OSX.
-Therefore, some help patches may not be functional.
+- The TCL/TK help patch is not usable under OSX.
+- With the standard PD distribution, threaded py scripts will cause "Stack overflows" under some circumstances
+ (the devel_0_37 cvs branch of PD contains the relevant fixes to avoid that)
----------------------------------------------------------------------------
@@ -54,24 +56,28 @@ It has been thoroughly tested with version 2.2 and 2.3
The package should at least compile (and is tested) with the following compilers:
+
PD @ Windows:
-------------
o Borland C++ 5.5 (free): edit "config-pd-bcc.txt" & run "build-pd-bcc.bat"
o Microsoft Visual C++ 6: usr "py.dsp" or edit "config-pd-msvc.txt" & run "build-pd-msvc.bat"
+
PD @ linux:
-----------
-Python doesn't provide a shared lib by default - static linking produces huge externals
-Ok, debian is an exception... the precompiled binary is for debian, therefore.
-
o GCC: edit "config-pd-linux.txt" & run "sh build-pd-linux.sh"
+
PD @ MacOSX:
---------------------
+You'll need to have Python installed as a framework.
+This is the default with Panther - otherwise, all newer Python source distributions are buildable as a darwin framework
+( ./configure --enable-framework=/System/Library/Frameworks && make && make installframework )
o GCC: edit "config-pd-darwin.txt" & run "sh build-pd-darwin.sh"
+
----------------------------------------------------------------------------
Version history:
diff --git a/externals/grill/py/source/main.h b/externals/grill/py/source/main.h
index 434aa99b..b0bf4711 100644
--- a/externals/grill/py/source/main.h
+++ b/externals/grill/py/source/main.h
@@ -14,7 +14,11 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define FLEXT_ATTRIBUTES 1
#include <flext.h>
+#if FLEXT_OS == FLEXT_OS_MAC
+#include <Python/Python.h>
+#else
#include <Python.h>
+#endif
#include <map>
#if FLEXT_OS == FLEXT_LINUX || FLEXT_OS == FLEXT_IRIX