Hmm...I wonder if patching the initial #!/usr/bin/env python call would 
do it.

Roy Mendelssohn wrote:
> Thanks, I found it right after sending the email.  This is beyond what 
> I know so all I can do is send the file  (below).
>
> Thanks,
>
> -Roy M.
>
>
>
> tcsh-% more setup.py
> #!/usr/bin/env python
>
> # $Id: setup.py,v 1.31 2006/05/15 20:10:10 pletzer Exp $
>
>
> from distutils.core import setup, Extension
> import re, sys, glob, time
>
> # change the version number below before uploading files
> version = '2.3'
> web_address = 'http://ncvtk.sf.net'
> ###############
> def create_header():
>     fname = 'src/nvHeaderTemplate.py'
>     f = open('src/nvHeaderTemplate.py', 'r')
>     lines = f.read()
>     f.close()
>     lines = re.sub(r'"ncvtk version"\s*:\s*"[^"]*"', \
>                    '"ncvtk version": "%s"'%version,lines)
>     now = time.asctime()
>     lines = re.sub(r'"ncvtk build date"\s*:\s*"[^"]*"', \
>                    '"ncvtk build date": "%s"'%now, lines)
>     lines = re.sub(r'"ncvtk web address"\s*:\s*"[^"]*"', \
>                    '"ncvtk web address": "%s"'% web_address, lines)
>     f = open('src/nvHeader.py', 'w')
>     f.write(lines)
>     f.close()
> def copy_ncvtk_script():
>     # this is mainly for backwrds compatibility. There used to be a
>     # script called ncvtk, which will now be the same as ncvtk2.
>     import shutil
>     fname_src = 'src/ncvtk2'
>     fname_dst = 'src/ncvtk'
>     shutil.copyfile(fname_src, fname_dst)
>
>
> DISTUTILS_DEBUG = '1'
>
> if sys.version < '2.3':
>     print 'ERROR: python 2.3 or later is required.'
>     sys.exit(1)
>
> try:
>     import Tkinter
> except:
>     print 'ERROR: could not import Tkinter.'
>     print 'You need python with Tk extensions enabled.'
>     print 'Check http://python.org. '
>     print 'Tcl/Tk libraries can be found at http://tcl.sourceforge.net/.'
>     sys.exit(7)
>
> try:
>     import vtk
> except:
>     print 'ERROR: could not access VTK library.'
>     print 'You must install VTK (http://kitware.com/) prior to running 
> ncvtk'
>     print 'or set PYTHONPATH to the location of the VTK library.'
>     sys.exit(6)
>
> min_vtk_version = (5, 0)
> v = vtk.vtkVersion()
> vtk_version = (v.GetVTKMajorVersion(), v.GetVTKMinorVersion())
> if 10*vtk_version[0]+ vtk_version[1] < 
> 10*min_vtk_version[0]+min_vtk_version[1]:
>     print 'ERROR: Ncvtk requires VTK %d.%d or later' % min_vtk_version
>     print 'Got VTK %d.%d' % vtk_version
>     sys.exit(7)
>
> try:
>     import Numeric
> except:
>     print 'ERROR: Numeric not installed'
>     print 'Must install NumPy from http://numpy.org/'
>     sys.exit(2)
>
> try:
>     import Scientific
> except:
>     print 'ERROR: Scientific not installed'
>     print 'Must install Scientific from 
> http://starship.python.net/~hinsen/ScientificPython/'
>     sys.exit(3)
>
> try:
>     from Scientific.IO.NetCDF import NetCDFFile
> except:
>     print 'ERROR: Scientific installed but NetCDF module is not working'
>     print 'Make sure you have NetCDF installed 
> (http://my.unidata.ucar.edu/content/software/netcdf/index.html)'
>     print 'Re-install Scientific by specifying NETCDF_PREFIX path in 
> setup.py file.'
>     sys.exit(5)
>
>
>
> try:
>     import Pmw
> except:
>     print 'ERROR: Pmw not installed'
>     print 'Must install Pmw from http://pmw.sourceforge.net/'
>     sys.exit(4)
>
> colormap_files = glob.glob('colormaps/*.spk')
> img_files = glob.glob('img/*.png')
> data_files = [] #glob.glob('data/*.nc')
>
> print 'create install'
> create_header()
> copy_ncvtk_script()
>
> setup(
>     name = 'ncvtk',
>        version = version,
>        description = 'A package to visualize time dependent 3D 
> structured data on the sphere.',
>        author = 'Jared Cohen, Remik Ziemlinski and Alexander Pletzer',
>        author_email = '[EMAIL PROTECTED], 
> [EMAIL PROTECTED], [EMAIL PROTECTED]',
>        url = web_address,
>        long_description ="""
> Ncvtk has been designed with the aim of offering a high degree of 
> interactivity to scientists
> who have a need to explore three-dimensional, time-dependent planetary 
> data.
> The input data should be stored in a NetCDF file and the metadata 
> should loosely follow the
> CDC 
> (http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml) 
> convention.
> In particular, we support codes that are part of the Flexible Modeling 
> System
> (http://www.gfdl.noaa.gov/~fms/) infrastructure provided the data lie 
> on a longitude/latitude,
> structured grid.
> """,
>     package_dir = {'ncvtk': 'src'},
>     packages = ['ncvtk',],
>     scripts = ['src/ncvtk2', 'src/ncvtk'],
>     data_files = [('ncvtk/icons',
>                    ['icons/firstframe.gif',
>                     'icons/lastframe.gif',
>                     'icons/nextframe.gif',
>                     'icons/pause.gif',
>                     'icons/playback.gif',
>                     'icons/play.gif',
>                     'icons/prevframe.gif']),
>                   ('ncvtk/colormaps', colormap_files),
>                   ('ncvtk/img', img_files),
>                   ('ncvtk/data', data_files),
>
>                   ]
>
>       )
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to