<commit_before>PREFIX = ${dir ${CURDIR}}
CC = gcc

default: gui-skip platform-skip python jpeg pil numpy matplotlib weave pychecker common pylint epydoc docutils ipython gmpy pyflakes

# avoid building some things on some platforms
# uses touch -a to avoid changing modification dates
platform-skip:
ifeq ("$(shell uname -s)","Darwin")
	touch -a tcl
	touch -a tk
# CEBALERT: doesn't stop readline building on mac!
	touch -a readline
endif

gui-skip:
ifeq (${GUI},0)
	touch -a tcl
	touch -a tk
endif


all: default pyaudiolab mlabwrap scipy ipython pyrex pytables psyco gnuplotpy

dist: bluesphere

clean: python-clean jpeg-clean pil-clean numpy-clean tk-clean tcl-clean matplotlib-clean weave-clean pychecker-clean common-clean pylint-clean epydoc-clean docutils-clean scipy-clean mlabwrap-clean ipython-clean libsndfile-clean pyaudiolab-clean psyco-clean pyrex-clean hdf5-clean pytables-clean gnuplotpy-clean bluesphere-clean player-clean progressbar-clean stage-clean gmp-clean mxnumber-clean gmpy-clean svn2cl-clean readline-clean termcap-clean guppy-clean pyopenssl-clean foolscap-clean zope_interface-clean twisted-clean mpi4py-clean openmpi-clean pyflakes-clean setuptools-clean freetype-clean libpng-clean zlib-clean m4-clean

uninstall: python-uninstall jpeg-uninstall pil-uninstall numpy-uninstall tk-uninstall tcl-uninstall matplotlib-uninstall weave-uninstall pychecker-uninstall common-uninstall pylint-uninstall epydoc-uninstall docutils-uninstall scipy-uninstall mlabwrap-uninstall ipython-uninstall libsndfile-uninstall pyaudiolab-uninstall psyco-uninstall pyrex-uninstall hdf5-uninstall pytables-uninstall gnuplotpy-uninstall player-uninstall progressbar-uninstall stage-uninstall gmp-uninstall mxnumber-uninstall gmpy-uninstall svn2cl-uninstall readline-uninstall termcap-uninstall guppy-uninstall pyopenssl-uninstall foolscap-uninstall zope_interface-uninstall twisted-uninstall mpi4py-uninstall openmpi-uninstall pyflakes-clean setuptools-clean freetype-uninstall libpng-uninstall zlib-uninstall m4-uninstall


#####
# CEB: hack apparently necessary to avoid occasional and mysterious
# "broken pipes" on buildbot
%.tar.gz_extract: %.tar.gz
	cp $< $<_tmp.tar.gz
	gunzip $<_tmp.tar.gz
	tar -xf $<_tmp.tar
	rm -f $<_tmp.tar

%.tgz_extract: %.tgz
	cp $< $<_tmp.tgz
	gunzip -f $<_tmp.tgz
	tar -xf $<_tmp.tar
	rm -f $<_tmp.tar
#####


##############################################################
# Python (interpreted language)
#
PYTHON2 = Python-2.6.4

PYTHON2_LIB  = lib/python2.6
PYTHON2_INC  = include/python2.6
PYTHON2_CONF = lib/python2.6/config

PYTHON2_UNINSTALL += bin/idle bin/python bin/pydoc bin/python2.6
PYTHON2_UNINSTALL += ${PYTHON2_LIB} man/man1/python.1 include/python2.6


# LDFLAGS sets ${PREFIX}/lib as the LD_LIBRARY in the binary
# CB: rpath is ignored on OS X (so where are the library files taken from?). 
python: ${PYTHON2}.tgz tk readline zlib
	echo ${PREFIX}
	tar -xzf ${PYTHON2}.tgz

# Configure for specific operating system versions
ifeq ("$(shell uname -s)","Darwin")
ifeq ("$(shell uname -r | cut -d . -f 1)","9") # Darwin 9.x == Mac OS X 10.5 (Leopard)
	patch -p0 < Python_OSX_tk.diff # build python with tcl/tk from /Library/Frameworks
	cd ${PYTHON2}; ./configure --prefix=${PREFIX} MACOSX_DEPLOYMENT_TARGET=10.5
else
ifeq ("$(shell uname -r | cut -d . -f 1)","10") # Darwin 10.x == Mac OS X 10.6 (Snow Leopard)
	cd ${PYTHON2}; ./configure --prefix=${PREFIX} MACOSX_DEPLOYMENT_TARGET=10.6 
else # Darwin pre 9
	patch -p0 < Python_OSX_tk.diff # build python with tcl/tk from /Library/Frameworks
	cd ${PYTHON2}; ./configure --prefix=${PREFIX}
endif
endif
else # linux
	cd ${PYTHON2}; ./configure --prefix=${PREFIX} LDFLAGS=-Wl,-rpath,${PREFIX}/lib
endif
	cd ${PYTHON2}; env PREFIX=${PREFIX} make EXTRA_CFLAGS=-I${PREFIX}/include
	cd ${PYTHON2}; env PREFIX=${PREFIX} make install
	touch python

python-clean:
	rm -rf ${PYTHON2} Python-2.4*/ Python-2.5*/

python-uninstall:
	rm -rf python ${foreach f,${PYTHON2_UNINSTALL}, ${PREFIX}/${f}} Python-2.4*/ Python-2.5*/

##############################################################
# Tcl (required by Tk GUI toolkit)
#
TCL = tcl8.5.10
TCL_UNINSTALL += bin/tclsh8.5 bin/wish8.5 lib/tclConfig.sh
TCL_UNINSTALL += lib/tcl8.5 lib.tclConfig.sh lib/libtcl8.5.so lib/libtclstub8.5.a
TCL_UNINSTALL += include/tcl*.h man/man*

tcl: ${TCL}-src.tar.gz
	tar -xzf ${TCL}-src.tar.gz
	cd ${TCL}/unix; ./configure --prefix=${PREFIX}
	make -C ${TCL}/unix install
	touch tcl

tcl-clean:
	rm -rf ${TCL} tcl8*/
tcl-uninstall:
	rm -rf tcl ${foreach f,${TCL_UNINSTALL}, ${PREFIX}/${f}} tcl8*/



##############################################################
# Tk (GUI toolkit)
#
TK = tk8.5.5

TK_UNINSTALL += lib/tk8.5 lib/libtk8.5.so lib/libtkstub8.5.a
TK_UNINSTALL += include/tk*.h lib/tkConfig.sh

tk: ${TK}-src.tar.gz tcl
	tar -xzf ${TK}-src.tar.gz
	cd ${TK}/unix; ./configure --prefix=${PREFIX} --enable-xft
	make -C ${TK}/unix install
	touch tk

tk-clean:
	rm -rf ${TK} tk8*/
tk-uninstall:
	rm -rf tk ${foreach f,${TK_UNINSTALL}, ${PREFIX}/${f}} tk8*/



##############################################################
# ipython (improved interactive prompt)
#
IPYTHON = ipython-0.10
IPYTHON_UNINSTALL =  ${PYTHON_LIB}/site-packages/IPython

ipython: ${IPYTHON}.tar.gz python 
	tar -xzf ${IPYTHON}.tar.gz
	cd ${IPYTHON}; ${PREFIX}/bin/python setup.py install
	touch ipython

ipython-clean:
	rm -rf ${IPYTHON} 
ipython-uninstall:
	rm -rf ipython ${IPYTHON} $(foreach f, ${IPYTHON_UNINSTALL}, ${PREFIX}/${f})


#############################################################
# freetype <commit_msg>Upgrade IPython to version 0.12<commit_after>PREFIX = ${dir ${CURDIR}}
CC = gcc

default: gui-skip platform-skip python jpeg pil numpy matplotlib weave pychecker common pylint epydoc docutils ipython gmpy pyflakes

# avoid building some things on some platforms
# uses touch -a to avoid changing modification dates
platform-skip:
ifeq ("$(shell uname -s)","Darwin")
	touch -a tcl
	touch -a tk
# CEBALERT: doesn't stop readline building on mac!
	touch -a readline
endif

gui-skip:
ifeq (${GUI},0)
	touch -a tcl
	touch -a tk
endif


all: default pyaudiolab mlabwrap scipy ipython pyrex pytables psyco gnuplotpy

dist: bluesphere

clean: python-clean jpeg-clean pil-clean numpy-clean tk-clean tcl-clean matplotlib-clean weave-clean pychecker-clean common-clean pylint-clean epydoc-clean docutils-clean scipy-clean mlabwrap-clean ipython-clean libsndfile-clean pyaudiolab-clean psyco-clean pyrex-clean hdf5-clean pytables-clean gnuplotpy-clean bluesphere-clean player-clean progressbar-clean stage-clean gmp-clean mxnumber-clean gmpy-clean svn2cl-clean readline-clean termcap-clean guppy-clean pyopenssl-clean foolscap-clean zope_interface-clean twisted-clean mpi4py-clean openmpi-clean pyflakes-clean setuptools-clean freetype-clean libpng-clean zlib-clean m4-clean

uninstall: python-uninstall jpeg-uninstall pil-uninstall numpy-uninstall tk-uninstall tcl-uninstall matplotlib-uninstall weave-uninstall pychecker-uninstall common-uninstall pylint-uninstall epydoc-uninstall docutils-uninstall scipy-uninstall mlabwrap-uninstall ipython-uninstall libsndfile-uninstall pyaudiolab-uninstall psyco-uninstall pyrex-uninstall hdf5-uninstall pytables-uninstall gnuplotpy-uninstall player-uninstall progressbar-uninstall stage-uninstall gmp-uninstall mxnumber-uninstall gmpy-uninstall svn2cl-uninstall readline-uninstall termcap-uninstall guppy-uninstall pyopenssl-uninstall foolscap-uninstall zope_interface-uninstall twisted-uninstall mpi4py-uninstall openmpi-uninstall pyflakes-clean setuptools-clean freetype-uninstall libpng-uninstall zlib-uninstall m4-uninstall


#####
# CEB: hack apparently necessary to avoid occasional and mysterious
# "broken pipes" on buildbot
%.tar.gz_extract: %.tar.gz
	cp $< $<_tmp.tar.gz
	gunzip $<_tmp.tar.gz
	tar -xf $<_tmp.tar
	rm -f $<_tmp.tar

%.tgz_extract: %.tgz
	cp $< $<_tmp.tgz
	gunzip -f $<_tmp.tgz
	tar -xf $<_tmp.tar
	rm -f $<_tmp.tar
#####


##############################################################
# Python (interpreted language)
#
PYTHON2 = Python-2.6.4

PYTHON2_LIB  = lib/python2.6
PYTHON2_INC  = include/python2.6
PYTHON2_CONF = lib/python2.6/config

PYTHON2_UNINSTALL += bin/idle bin/python bin/pydoc bin/python2.6
PYTHON2_UNINSTALL += ${PYTHON2_LIB} man/man1/python.1 include/python2.6


# LDFLAGS sets ${PREFIX}/lib as the LD_LIBRARY in the binary
# CB: rpath is ignored on OS X (so where are the library files taken from?). 
python: ${PYTHON2}.tgz tk readline zlib
	echo ${PREFIX}
	tar -xzf ${PYTHON2}.tgz

# Configure for specific operating system versions
ifeq ("$(shell uname -s)","Darwin")
ifeq ("$(shell uname -r | cut -d . -f 1)","9") # Darwin 9.x == Mac OS X 10.5 (Leopard)
	patch -p0 < Python_OSX_tk.diff # build python with tcl/tk from /Library/Frameworks
	cd ${PYTHON2}; ./configure --prefix=${PREFIX} MACOSX_DEPLOYMENT_TARGET=10.5
else
ifeq ("$(shell uname -r | cut -d . -f 1)","10") # Darwin 10.x == Mac OS X 10.6 (Snow Leopard)
	cd ${PYTHON2}; ./configure --prefix=${PREFIX} MACOSX_DEPLOYMENT_TARGET=10.6 
else # Darwin pre 9
	patch -p0 < Python_OSX_tk.diff # build python with tcl/tk from /Library/Frameworks
	cd ${PYTHON2}; ./configure --prefix=${PREFIX}
endif
endif
else # linux
	cd ${PYTHON2}; ./configure --prefix=${PREFIX} LDFLAGS=-Wl,-rpath,${PREFIX}/lib
endif
	cd ${PYTHON2}; env PREFIX=${PREFIX} make EXTRA_CFLAGS=-I${PREFIX}/include
	cd ${PYTHON2}; env PREFIX=${PREFIX} make install
	touch python

python-clean:
	rm -rf ${PYTHON2} Python-2.4*/ Python-2.5*/

python-uninstall:
	rm -rf python ${foreach f,${PYTHON2_UNINSTALL}, ${PREFIX}/${f}} Python-2.4*/ Python-2.5*/

##############################################################
# Tcl (required by Tk GUI toolkit)
#
TCL = tcl8.5.10
TCL_UNINSTALL += bin/tclsh8.5 bin/wish8.5 lib/tclConfig.sh
TCL_UNINSTALL += lib/tcl8.5 lib.tclConfig.sh lib/libtcl8.5.so lib/libtclstub8.5.a
TCL_UNINSTALL += include/tcl*.h man/man*

tcl: ${TCL}-src.tar.gz
	tar -xzf ${TCL}-src.tar.gz
	cd ${TCL}/unix; ./configure --prefix=${PREFIX}
	make -C ${TCL}/unix install
	touch tcl

tcl-clean:
	rm -rf ${TCL} tcl8*/
tcl-uninstall:
	rm -rf tcl ${foreach f,${TCL_UNINSTALL}, ${PREFIX}/${f}} tcl8*/



##############################################################
# Tk (GUI toolkit)
#
TK = tk8.5.5

TK_UNINSTALL += lib/tk8.5 lib/libtk8.5.so lib/libtkstub8.5.a
TK_UNINSTALL += include/tk*.h lib/tkConfig.sh

tk: ${TK}-src.tar.gz tcl
	tar -xzf ${TK}-src.tar.gz
	cd ${TK}/unix; ./configure --prefix=${PREFIX} --enable-xft
	make -C ${TK}/unix install
	touch tk

tk-clean:
	rm -rf ${TK} tk8*/
tk-uninstall:
	rm -rf tk ${foreach f,${TK_UNINSTALL}, ${PREFIX}/${f}} tk8*/



##############################################################
# ipython (improved interactive prompt)
#
IPYTHON = ipython-0.12
IPYTHON_UNINSTALL =  ${PYTHON_LIB}/site-packages/IPython

ipython: ${IPYTHON}.tar.gz python 
	tar -xzf ${IPYTHON}.tar.gz
	cd ${IPYTHON}; ${PREFIX}/bin/python setup.py install
	touch ipython

ipython-clean:
	rm -rf ${IPYTHON} 
ipython-uninstall:
	rm -rf ipython ${IPYTHON} $(foreach f, ${IPYTHON_UNINSTALL}, ${PREFIX}/${f})


#############################################################
# freetype 
{'fraction_non_alphanumeric': 0.18141910051962015, 'fraction_numerical': 0.01854506360867228, 'mean_word_length': 4.79595015576324, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4072617', 'n_tokens_mistral': 4271, 'n_tokens_neox': 4056, 'n_words': 1020}