# HG changeset patch # User Matthew Turk # Date 1224914769 25200 # Branch yt-1.0 # Node ID b7763d12ffd2ee7fa08d814a66d77e316334a846 # Parent 38e412a867fb28db8d00a4e88a37906c76aab33e [svn r834] Lots of changes! * Disabled currently non-functional Cosmology imports (Britton's on it!) * Updated README files in yt-1.0 and trunk to be more informative and up to date * Added CREDITS file (I may have missed someone; if you should be on here, tell me. I honestly did not mean to skip anybody!) * Updated setup.py files to be more in line with using setuptools -- specifically, the requirements are accurately specified. This is part of a broader effort I will be making to make this package more ... pythonic? modern? not sure. The next step will be compartmentalizing the recipe book as entry points. * Installation scripts are now both the NEW version. This has a few changes! * We no longer manually install numpy, matplotlib or ipython, as their eggs are now functional in all the instances I have tested. This may get reverted, but for now, it seems the best path. * YT is no longer "installed" per se, but run via "develop" -- this is the right way to do it in a developer environment like what I want to encourage. * Got rid of advertising the 'yt' script, since we now install IPython. diff -r 38e412a867fb28db8d00a4e88a37906c76aab33e -r b7763d12ffd2ee7fa08d814a66d77e316334a846 CREDITS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CREDITS Fri Oct 24 23:06:09 2008 -0700 @@ -0,0 +1,11 @@ +YT is increasingly a group project. + +Lead Developer: Matthew Turk (matthewturk@gmail.com) +Orion Support: Jeff Oishi (jsoishi@gmail.com) +Cosmology & Fragmentation Analysis: Britton Smith (brittonsmith@gmail.com) +Galaxy Merger Trees: Stephen Skory (sskory@physics.ucsd.edu) + +We also include the Delaunay Triangulation module written by Robert Kern of +Enthought. + +Thanks to everyone for all your contributions! diff -r 38e412a867fb28db8d00a4e88a37906c76aab33e -r b7763d12ffd2ee7fa08d814a66d77e316334a846 README --- a/README Wed Oct 01 16:07:27 2008 -0700 +++ b/README Fri Oct 24 23:06:09 2008 -0700 @@ -2,20 +2,20 @@ mesh refinement datasets. It's written in python and based on the NumPy and Matplotlib components. -Full documentation is available at doc/build/html/index.html , as well as -online at http://yt.spacepope.org/ . For a quick start, assuming you have both -matplotlib and numpy installed, just set your HDF5 install location: +Full documentation is available inside doc/docs_html.zip as well as +online at http://yt.enzotools.org/ . - $ echo /path/to/your/hdf5/root > hdf5.cfg +If you have used Python before, and are comfortable with installing packages, +you should find the setup.py script fairly straightforward. -and then install: - - $ python setup.py install - -You might have to use a --prefix= command, however. +If you would rather a more automated installation, you can use the script +doc/install_script.sh . You will have to set the destination directory, and +there are options available, but it should be straightforward. Please feel free to help out, and if you make any cool changes or enhancements, -let me know! The Trac site at http://yt.spacepope.org/ has mechanisms for -ticket and problem submission, as well as an ever-growing Wiki. +let me know! The Trac site at http://yt.enzotools.org/ has mechanisms for +ticket and problem submission, as well as an ever-growing Wiki. I also +encourage you to sign up for the yt-users mailing list, where there is a +growing community of users ready to help out with problems and ideas! - -- Matthew Turk, mturk@stanford.edu + -- Matthew Turk, matthewturk@gmail.com diff -r 38e412a867fb28db8d00a4e88a37906c76aab33e -r b7763d12ffd2ee7fa08d814a66d77e316334a846 doc/install_script.sh --- a/doc/install_script.sh Wed Oct 01 16:07:27 2008 -0700 +++ b/doc/install_script.sh Fri Oct 24 23:06:09 2008 -0700 @@ -1,40 +1,111 @@ -# Modify this line to change where we install -#MY_DIR="/scratch/yt-`uname -p`/" +# +# Hi there! Welcome to the yt installation script. +# +# This script is designed to create a fully isolated Python installation +# with the dependencies you need to run yt. +# +# There are a few options, but you only need to set *one* of them. And +# that's the next one, DEST_DIR. But, if you want to use an existing HDF5 +# installation you can set HDF5_DIR, or if you want to use some other +# subversion checkout of YT, you can set YT_DIR, too. (It'll already +# check the current directory and one up. +# +# NOTE: If you have trouble with wxPython, set INST_WXPYTHON=0 . +# +# And, feel free to drop me a line: matthewturk@gmail.com +# -if [ -z "$MY_DIR" ] +#DEST_DIR="`pwd`/yt-`uname -p`" # Installation location + +# Here's where you put the HDF5 path if you like +#HDF5_DIR= + + +INST_WXPYTHON=0 # If you 't want to install wxPython, set this to 1 +INST_ZLIB=0 # On some systems (Kraken) matplotlib has issues with + # the system zlib, which is compiled statically + +# If you've got YT some other place, set this to point to it. +YT_DIR="" + +#------------------------------------------------------------------------------# +# # +# Okay, the script starts here. Feel free to play with it, but hopefully # +# it'll work as is. # +# # +#------------------------------------------------------------------------------# + +ORIG_PWD=`pwd` + +if [ -z "${DEST_DIR}" ] then - echo "Edit this script, set the MY_DIR parameter and re-run." - + echo "Edit this script, set the DEST_DIR parameter and re-run." exit 1 fi -mkdir -p $MY_DIR/src -cd $MY_DIR/src +echo "Installing into ${DEST_DIR}" +echo "INST_WXPYTHON=${INST_WXPYTHON}" +echo "INST_IPYTHON=${INST_IPYTHON}" + +mkdir -p ${DEST_DIR}/src +cd ${DEST_DIR}/src # Individual processes -[ ! -e hdf5-1.6.7.tar.gz ] && wget ftp://ftp.hdfgroup.org/HDF5/current16/src/hdf5-1.6.7.tar.gz +if [ -z "$HDF5_DIR" ] +then + [ ! -e hdf5-1.6.7.tar.gz ] && wget ftp://ftp.hdfgroup.org/HDF5/current16/src/hdf5-1.6.7.tar.gz +fi +[ $INST_ZLIB -eq 1 ] && [ ! -e zlib-1.2.3.tar.bz2 ] && wget http://www.zlib.net/zlib-1.2.3.tar.bz2 [ ! -e Python-2.5.2.tgz ] && wget http://python.org/ftp/python/2.5.2/Python-2.5.2.tgz -[ ! -e pytables-2.0.4.tar.gz ] && wget http://www.pytables.org/download/stable/pytables-2.0.4.tar.gz +[ $INST_WXPYTHON -eq 1 ] && [ ! -e wxPython-src-2.8.7.1.tar.bz2 ] && wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.7.1.tar.bz2 -[ ! -e matplotlib-0.91.4.tar.gz ] && wget "http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.4.tar.gz" -[ ! -e numpy-1.0.4.tar.gz ] && wget "http://downloads.sourceforge.net/numpy/numpy-1.0.4.tar.gz?modtime=1194536674&big_mirror=0" +if [ -z "$YT_DIR" ] +then + if [ -e $ORIG_PWD/yt/mods.py ] + then + YT_DIR="$ORIG_PWD" + elif [ -e $ORIG_PWD/../yt/mods.py ] + then + YT_DIR=`dirname $ORIG_PWD` + elif [ ! -e yt-trunk-svn ] + then + svn co http://svn.enzotools.org/yt/trunk/ ./yt-trunk-svn + YT_DIR="$PWD/yt-trunk-svn/" + fi + echo Setting YT_DIR=${YT_DIR} +fi -[ ! -e wxPython-src-2.8.7.1.tar.bz2 ] && wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.7.1.tar.bz2 -[ ! -e yt ] && svn co http://svn.enzotools.org/yt/branches/yt-1.0/ ./yt-1.0-svn +if [ $INST_ZLIB -eq 1 ] +then + if [ ! -e zlib-1.2.3/done ] + then + [ ! -e zlib-1.2.3 ] && tar xvfj zlib-1.2.3.tar.bz2 + echo "Doing ZLIB" + cd zlib-1.2.3 + ./configure --shared --prefix=${DEST_DIR}/ || exit 1 + make install || exit 1 + touch done + cd .. + fi + ZLIB_DIR=${DEST_DIR} + LDFLAGS="${LDFLAGS} -L${ZLIB_DIR}/lib/" + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ZLIB_DIR}/lib/" +fi - - -if [ ! -e hdf5-1.6.7/done ] +if [ -z "$HDF5_DIR" ] then - [ ! -e hdf5-1.6.7 ] && tar xvfz hdf5-1.6.7.tar.gz - echo "Doing HDF5" - cd hdf5-1.6.7 - ./configure --prefix=$MY_DIR/ || exit 1 - make install || exit 1 - - touch done - cd .. + if [ ! -e hdf5-1.6.7/done ] + then + [ ! -e hdf5-1.6.7 ] && tar xvfz hdf5-1.6.7.tar.gz + echo "Doing HDF5" + cd hdf5-1.6.7 + ./configure --prefix=${DEST_DIR}/ || exit 1 + make install || exit 1 + touch done + cd .. + fi + HDF5_DIR=${DEST_DIR} fi if [ ! -e Python-2.5.2/done ] @@ -42,7 +113,7 @@ echo "Doing Python" [ ! -e Python-2.5.2 ] && tar xvfz Python-2.5.2.tgz cd Python-2.5.2 - ./configure --prefix=$MY_DIR/ || exit 1 + ./configure --prefix=${DEST_DIR}/ || exit 1 make || exit 1 make install || exit 1 @@ -50,78 +121,63 @@ cd .. fi -export PYTHONPATH=$MY_DIR/lib/python2.5/site-packages/ +export PYTHONPATH=${DEST_DIR}/lib/python2.5/site-packages/ -if [ ! -e numpy-1.0.4/done ] -then - echo "Doing NumPy" - - [ ! -e numpy-1.0.4 ] && tar xvfz numpy-1.0.4.tar.gz - cd numpy-1.0.4 - $MY_DIR/bin/python2.5 setup.py install || exit 1 - touch done - cd .. -fi - -if [ ! -e pytables-2.0.4/done ] - -then - echo "Doing PyTables" - [ ! -e pytables-2.0.4 ] && tar xvfz pytables-2.0.4.tar.gz - cd pytables-2.0.4 - $MY_DIR/bin/python2.5 setup.py install --hdf5=$MY_DIR/ || exit 1 - touch done - - cd .. -fi - -if [ ! -e wxPython-src-2.8.7.1/done ] +if [ $INST_WXPYTHON -eq 1 ] && [ ! -e wxPython-src-2.8.7.1/done ] then echo "Doing wxPython" [ ! -e wxPython-src-2.8.7.1 ] && tar xvfj wxPython-src-2.8.7.1.tar.bz2 cd wxPython-src-2.8.7.1 - ./configure --prefix=$MY_DIR/ --with-opengl || exit 1 + ./configure --prefix=${DEST_DIR}/ --with-opengl || exit 1 make install || exit 1 cd contrib make install || exit 1 cd ../wxPython/ - $MY_DIR/bin/python2.5 setup.py WX_CONFIG=$MY_DIR/bin/wx-config install || exit 1 + ${DEST_DIR}/bin/python2.5 setup.py WX_CONFIG=${DEST_DIR}/bin/wx-config install || exit 1 touch ../done cd ../.. fi -if [ ! -e matplotlib-0.91.4/done ] -then - echo "Doing Matplotlib" - [ ! -e matplotlib-0.91.4 ] && tar xvfz matplotlib-0.91.4.tar.gz - cd matplotlib-0.91.4 - $MY_DIR/bin/python2.5 setup.py install || exit 1 - - touch done - cd .. -fi +echo "Installing numpy, matplotlib, ipython" +${DEST_DIR}/bin/python2.5 ${YT_DIR}/ez_setup.py +${DEST_DIR}/bin/easy_install numpy || exit 1 +${DEST_DIR}/bin/easy_install matplotlib || exit 1 +${DEST_DIR}/bin/easy_install ipython || exit 1 echo "Doing yt update" -cd yt-1.0-svn +MY_PWD=`pwd` +cd $YT_DIR svn up -echo $MY_DIR > hdf5.cfg -$MY_DIR/bin/python2.5 setup.py install || exit 1 +echo $HDF5_DIR > hdf5.cfg +${DEST_DIR}/bin/python2.5 setup.py develop || exit 1 touch done -cd .. +cd $MY_PWD - -echo "yt is now installed in $MY_DIR ." +echo +echo +echo "========================================================================" +echo +echo "yt is now installed in $DEST_DIR ." echo "To run from this new installation, the a few variables need to be" echo "prepended with the following information:" echo -echo "PATH => $MY_DIR/bin/" -echo "PYTHONPATH => $MY_DIR/lib/python2.5/site-packages/" -echo "LD_LIBRARY_PATH => $MY_DIR/lib/" +echo "PATH => $DEST_DIR/bin/" +echo "PYTHONPATH => $DEST_DIR/lib/python2.5/site-packages/" +echo "LD_LIBRARY_PATH => $DEST_DIR/lib/" echo -echo "You can get a fully-loaded yt prompt by running:" -echo "$MY_DIR/bin/yt" +echo "For interactive data analysis and visualization, we recommend running" +echo "the IPython interface, which will become more fully featured with time:" echo +echo "$DEST_DIR/bin/iyt" +echo +echo "Note of interest: this installation will use the directory" +echo "$YT_DIR" +echo "as the source for all the YT code. This means you probably shouldn't" +echo "delete it, but on the plus side, any changes you make there are" +echo "automatically propagated." +echo +echo "========================================================================" diff -r 38e412a867fb28db8d00a4e88a37906c76aab33e -r b7763d12ffd2ee7fa08d814a66d77e316334a846 doc/install_v2.sh --- a/doc/install_v2.sh Wed Oct 01 16:07:27 2008 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,217 +0,0 @@ -# -# Hi there! Welcome to the yt installation script. -# -# This script is designed to create a fully isolated Python installation -# with the dependencies you need to run yt. -# -# There are a few options, but you only need to set *one* of them. And -# that's the next one, DEST_DIR. But, if you want to use an existing HDF5 -# installation you can set HDF5_DIR, or if you want to use some other -# subversion checkout of YT, you can set YT_DIR, too. (It'll already -# check the current directory and one up. -# -# NOTE: If you have trouble with wxPython, set INST_WXPYTHON=0 . -# -# And, feel free to drop me a line: matthewturk@gmail.com -# - -#DEST_DIR="$HOME/local/" - -# Here's where you put the HDF5 path if you like -#HDF5_DIR= -# If you don't want to install wxPython, turn this to zero -INST_WXPYTHON=1 -INST_IPYTHON=1 -INST_ZLIB=0 -# If you've got YT some other place, set this to point to it. -#YT_DIR= - -# -# Okay, the script starts here. Feel free to play with it, but hopefully it'll -# work as is. -# - -ORIG_PWD=`pwd` - -if [ -z "${DEST_DIR}" ] -then - echo "Edit this script, set the DEST_DIR parameter and re-run." - exit 1 -fi - -echo "Installing into ${DEST_DIR}" -echo "INST_WXPYTHON=${INST_WXPYTHON}" -echo "INST_IPYTHON=${INST_IPYTHON}" - -mkdir -p ${DEST_DIR}/src -cd ${DEST_DIR}/src - -# Individual processes -if [ -z "$HDF5_DIR" ] -then - [ ! -e hdf5-1.6.7.tar.gz ] && wget ftp://ftp.hdfgroup.org/HDF5/current16/src/hdf5-1.6.7.tar.gz -fi - -[ $INST_ZLIB -eq 1 ] && [ ! -e zlib-1.2.3.tar.bz2 ] && wget http://www.zlib.net/zlib-1.2.3.tar.bz2 -[ ! -e Python-2.5.2.tgz ] && wget http://python.org/ftp/python/2.5.2/Python-2.5.2.tgz -[ ! -e pytables-2.0.4.tar.gz ] && wget http://www.pytables.org/download/stable/pytables-2.0.4.tar.gz -[ ! -e matplotlib-0.91.4.tar.gz ] && wget "http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.4.tar.gz" -[ ! -e numpy-1.0.4.tar.gz ] && wget "http://downloads.sourceforge.net/numpy/numpy-1.0.4.tar.gz?modtime=1194536674&big_mirror=0" -[ $INST_WXPYTHON -eq 1 ] && [ ! -e wxPython-src-2.8.7.1.tar.bz2 ] && wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.7.1.tar.bz2 -[ $INST_IPYTHON -eq 1 ] && [ ! -e ipython-0.9.1.tar.gz ] && wget http://ipython.scipy.org/dist/ipython-0.9.1.tar.gz - -if [ -z "$YT_DIR" ] -then - if [ -e $ORIG_PWD/yt/mods.py ] - then - YT_DIR="$ORIG_PWD" - elif [ -e $ORIG_PWD/../yt/mods.py ] - then - YT_DIR=`dirname $ORIG_PWD` - elif [ ! -e yt-trunk-svn ] - then - svn co http://svn.enzotools.org/yt/trunk/ ./yt-trunk-svn - YT_DIR="$PWD/yt-trunk-svn/" - fi - echo Setting YT_DIR=${YT_DIR} -fi - -if [ $INST_ZLIB -eq 1 ] -then - if [ ! -e zlib-1.2.3/done ] - then - [ ! -e zlib-1.2.3 ] && tar xvfj zlib-1.2.3.tar.bz2 - echo "Doing ZLIB" - cd zlib-1.2.3 - ./configure --shared --prefix=${DEST_DIR}/ || exit 1 - make install || exit 1 - touch done - cd .. - fi - ZLIB_DIR=${DEST_DIR} - LDFLAGS="${LDFLAGS} -L${ZLIB_DIR}/lib/" - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ZLIB_DIR}/lib/" -fi - -if [ -z "$HDF5_DIR" ] -then - if [ ! -e hdf5-1.6.7/done ] - then - [ ! -e hdf5-1.6.7 ] && tar xvfz hdf5-1.6.7.tar.gz - echo "Doing HDF5" - cd hdf5-1.6.7 - ./configure --prefix=${DEST_DIR}/ || exit 1 - make install || exit 1 - touch done - cd .. - fi - HDF5_DIR=${DEST_DIR} -fi - -if [ ! -e Python-2.5.2/done ] -then - echo "Doing Python" - [ ! -e Python-2.5.2 ] && tar xvfz Python-2.5.2.tgz - cd Python-2.5.2 - ./configure --prefix=${DEST_DIR}/ || exit 1 - - make || exit 1 - make install || exit 1 - touch done - cd .. -fi - -export PYTHONPATH=${DEST_DIR}/lib/python2.5/site-packages/ - -if [ ! -e numpy-1.0.4/done ] -then - echo "Doing NumPy" - - [ ! -e numpy-1.0.4 ] && tar xvfz numpy-1.0.4.tar.gz - cd numpy-1.0.4 - ${DEST_DIR}/bin/python2.5 setup.py install || exit 1 - touch done - cd .. -fi - -if [ ! -e pytables-2.0.4/done ] - -then - echo "Doing PyTables" - [ ! -e pytables-2.0.4 ] && tar xvfz pytables-2.0.4.tar.gz - cd pytables-2.0.4 - ${DEST_DIR}/bin/python2.5 setup.py install --hdf5=$HDF5_DIR/ || exit 1 - touch done - - cd .. -fi - -if [ $INST_WXPYTHON -eq 1 ] && [ ! -e wxPython-src-2.8.7.1/done ] -then - echo "Doing wxPython" - [ ! -e wxPython-src-2.8.7.1 ] && tar xvfj wxPython-src-2.8.7.1.tar.bz2 - cd wxPython-src-2.8.7.1 - - ./configure --prefix=${DEST_DIR}/ --with-opengl || exit 1 - make install || exit 1 - cd contrib - make install || exit 1 - cd ../wxPython/ - ${DEST_DIR}/bin/python2.5 setup.py WX_CONFIG=${DEST_DIR}/bin/wx-config install || exit 1 - - touch ../done - cd ../.. -fi - -if [ ! -e matplotlib-0.91.4/done ] -then - echo "Doing Matplotlib" - [ ! -e matplotlib-0.91.4 ] && tar xvfz matplotlib-0.91.4.tar.gz - cd matplotlib-0.91.4 - ${DEST_DIR}/bin/python2.5 setup.py install || exit 1 - - touch done - cd .. -fi - -if [ $INST_IPYTHON -eq 1 ] && [ ! -e ipython-0.9.1/done ] -then - echo "Doing IPython" - [ ! -e ipython-0.9.1 ] && tar xvfz ipython-0.9.1.tar.gz - cd ipython-0.9.1 - ${DEST_DIR}/bin/python2.5 setup.py install || exit 1 - touch done - cd .. -fi - -echo "Doing yt update" -MY_PWD=`pwd` -cd $YT_DIR -svn up -echo $HDF5_DIR > hdf5.cfg -${DEST_DIR}/bin/python2.5 ez_setup.py -${DEST_DIR}/bin/python2.5 setup.py install || exit 1 -touch done -cd $MY_PWD - -echo "yt is now installed in $DEST_DIR ." -echo "To run from this new installation, the a few variables need to be" - -echo "prepended with the following information:" -echo -echo "PATH => $DEST_DIR/bin/" -echo "PYTHONPATH => $DEST_DIR/lib/python2.5/site-packages/" -echo "LD_LIBRARY_PATH => $DEST_DIR/lib/" - -echo -echo "You can get a fully-loaded yt prompt by running:" -echo "$DEST_DIR/bin/yt" -echo -if [ $INST_IPYTHON -eq 1 ] -then - echo "For interactive data analysis and visualization, we now recommend running" - echo "the IPython interface, which will become more fully featured with time!" - echo - echo "$DEST_DIR/bin/iyt" - echo -fi diff -r 38e412a867fb28db8d00a4e88a37906c76aab33e -r b7763d12ffd2ee7fa08d814a66d77e316334a846 setup.py --- a/setup.py Wed Oct 01 16:07:27 2008 -0700 +++ b/setup.py Fri Oct 24 23:06:09 2008 -0700 @@ -9,7 +9,8 @@ APP = ['reason.py'] DATA_FILES = [] -OPTIONS = {'argv_emulation': True} +PY2APP_OPTIONS = {'argv_emulation': True} +VERSION = "1.0dev" if os.path.exists('MANIFEST'): os.remove('MANIFEST') @@ -34,17 +35,23 @@ setup( name = "yt", - version = "0.3", - description = "A set of classes for manipulating Enzo Adaptive Mesh Refinement data", - install_requires = ['matplotlib>=0.91.4', - 'numpy>=1.0.3', - 'wxPython>=2.8.7.1'], + version = VERSION, + description = "An analysis and visualization toolkit for Adaptive Mesh " \ + + "Refinement data, specifically for the Enzo and Orion codes.", + classifiers = [], + keywords='', + install_requires = ['matplotlib', 'numpy','ipython'], + extras_require = { 'GUI' : ['wxPython'], + 'storage' : ['tables'], }, + author="Matthew J. Turk", + author_email="matthewturk@gmail.com", url = "http://yt.enzotools.org/", - author="Matthew Turk", - author_email="matthewturk@gmail.com", license="GPL-3", configuration=configuration, - #app=APP, data_files=DATA_FILES, options={'py2app':OPTIONS}, + app=APP, # for py2app + data_files=DATA_FILES, + options={'py2app':PY2APP_OPTIONS}, + zip_safe=False, ) return