From: <js...@us...> - 2007-11-26 19:02:42
|
Revision: 4452 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4452&view=rev Author: jswhit Date: 2007-11-26 11:02:33 -0800 (Mon, 26 Nov 2007) Log Message: ----------- only install dap and httplib2 if not already available Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-11-26 18:58:41 UTC (rev 4451) +++ trunk/toolkits/basemap/setup.py 2007-11-26 19:02:33 UTC (rev 4452) @@ -102,16 +102,17 @@ define_macros = dbf_macros()) ] # install dap and httplib2, if not already available. -#try: -# from dap import client -#except ImportError: -packages = packages + ['dap','dap.util','dap.parsers'] -package_dirs['dap'] = os.path.join('lib','dap') -#try: -# import httplib2 -#except ImportError: -packages = packages + ['httplib2'] -package_dirs['httlib2'] = os.path.join('lib','httplib2') +# only a subset of dap is installed (the client, not the server) +try: + from dap import client +except ImportError: + packages = packages + ['dap','dap.util','dap.parsers'] + package_dirs['dap'] = os.path.join('lib','dap') +try: + import httplib2 +except ImportError: + packages = packages + ['httplib2'] + package_dirs['httlib2'] = os.path.join('lib','httplib2') if 'setuptools' in sys.modules: # Are we running with setuptools? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-08 13:59:19
|
Revision: 4672 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4672&view=rev Author: jswhit Date: 2007-12-08 05:58:50 -0800 (Sat, 08 Dec 2007) Log Message: ----------- try to automatically detect GEOS lib location (instead of forcing user to set GEOS_DIR env var). On Leopard, env vars don't get passed by sudo. Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-12-08 02:35:27 UTC (rev 4671) +++ trunk/toolkits/basemap/setup.py 2007-12-08 13:58:50 UTC (rev 4672) @@ -35,35 +35,44 @@ """check geos C-API header file (geos_c.h)""" try: f = open(os.path.join(GEOS_dir,'include/geos_c.h')) - except: - raise SystemExit(""" -Cannot find geos header file (geos_c.h) in %s/include. Please check -your geos installation and make sure the GEOS_DIR environment -variable is set correctly.""" %GEOS_dir) + except IOError: + return None geos_version = None for line in f: if line.startswith('#define GEOS_VERSION'): geos_version = line.split()[2] return geos_version -# get location of geos lib from environment variable. -GEOS_dir = os.environ.get('GEOS_DIR') +# get location of geos lib from environment variable if it is set. +if os.environ.has_key('GEOS_DIR'): + GEOS_dir = os.environ.get('GEOS_DIR') +else: +# set GEOS_dir manually here if automatic detection fails. + GEOS_dir = None + if GEOS_dir is None: - raise SystemExit(""" -please specify the location of geos library and headers with -the GEOS_DIR environment variable. For example if libgeos_c -is installed in /usr/local/lib, and geos_c.h is installed in -/usr/local/include, set GEOS_DIR to /usr/local.""") -# check that header geos_c.h is in GEOS_dir/include, -# and that the version number in the header file is 2.2.3. -geos_version = check_geosversion(GEOS_dir) + # if GEOS_dir not set, check a few standard locations. + GEOS_dirs = ['/usr/local','/sw','/opt',os.path.expanduser('~')] + for direc in GEOS_dirs: + geos_version = check_geosversion(direc) + print 'checking for GEOS lib in %s ....' % direc + if geos_version != '"2.2.3"': + continue + else: + print 'GEOS lib found in %s' % direc + GEOS_dir = direc + break +else: + geos_version = check_geosversion(GEOS_dir) if geos_version != '"2.2.3"': raise SystemExit(""" -geos library version 2.2.3 is required, you have version %s -installed in %s. Please change the GEOS_DIR environment variable -to point to the location where geos 2.2.3 is installed, or -install 2.2.3 from the source code included with basemap -(see the README for details).""" % (geos_version, GEOS_dir)) +Can't find geos library version 2.2.3. Please set the +environment variable GEOS_DIR to point to the location +where geos 2.2.3 is installed (for example, if geos_c.h +is in /usr/local/include, and libgeos_c is in /usr/local/lib, +set GEOS_DIR to /usr/local), or edit the setup.py script +manually and set the variable GEOS_dir (right after the line +that says "set GEOS_dir manually here".""") else: geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] geos_library_dirs=[os.path.join(GEOS_dir,'lib')] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-08 17:05:57
|
Revision: 4677 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4677&view=rev Author: jswhit Date: 2007-12-08 09:05:53 -0800 (Sat, 08 Dec 2007) Log Message: ----------- search in lib64 too. Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-12-08 17:00:28 UTC (rev 4676) +++ trunk/toolkits/basemap/setup.py 2007-12-08 17:05:53 UTC (rev 4677) @@ -75,7 +75,7 @@ that says "set GEOS_dir manually here".""") else: geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] - geos_library_dirs=[os.path.join(GEOS_dir,'lib')] + geos_library_dirs=[os.path.join(GEOS_dir,'lib'),os.path.join(GEOS_dir,'lib64')] # proj4 and geos extensions. deps = glob.glob('src/*.c') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-12 16:43:39
|
Revision: 4710 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4710&view=rev Author: jswhit Date: 2007-12-12 08:43:29 -0800 (Wed, 12 Dec 2007) Log Message: ----------- install dap client anyway if installed version is older. Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-12-12 16:25:57 UTC (rev 4709) +++ trunk/toolkits/basemap/setup.py 2007-12-12 16:43:29 UTC (rev 4710) @@ -112,11 +112,20 @@ # install dap and httplib2, if not already available. # only a subset of dap is installed (the client, not the server) +__dapversion__ = None try: - from dap import client + from dap.lib import __version__ as __dapversion__ except ImportError: packages = packages + ['dap','dap.util','dap.parsers'] package_dirs['dap'] = os.path.join('lib','dap') +# install dap client anyway if installed version is older than +# version provided here. +if __dapversion__ is not None: + __dapversion__ = [repr(v)+'.' for v in __dapversion__] + __dapversion__ = ''.join(__dapversion__)[:-1] + if __dapversion__ < '2.2.6.2': + packages = packages + ['dap','dap.util','dap.parsers'] + package_dirs['dap'] = os.path.join('lib','dap') try: import httplib2 except ImportError: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-14 16:28:45
|
Revision: 4732 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4732&view=rev Author: jswhit Date: 2007-12-14 08:28:34 -0800 (Fri, 14 Dec 2007) Log Message: ----------- look in /opt/local for geos lib (macports installs there) Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-12-14 13:01:36 UTC (rev 4731) +++ trunk/toolkits/basemap/setup.py 2007-12-14 16:28:34 UTC (rev 4732) @@ -52,7 +52,7 @@ if GEOS_dir is None: # if GEOS_dir not set, check a few standard locations. - GEOS_dirs = ['/usr/local','/sw','/opt',os.path.expanduser('~')] + GEOS_dirs = ['/usr/local','/sw','/opt','/opt/local',os.path.expanduser('~')] for direc in GEOS_dirs: geos_version = check_geosversion(direc) print 'checking for GEOS lib in %s ....' % direc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-14 21:16:40
|
Revision: 4736 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4736&view=rev Author: jswhit Date: 2007-12-14 13:16:38 -0800 (Fri, 14 Dec 2007) Log Message: ----------- took out namespace package stuff (because I don't understand it, and it apparently is not needed). Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-12-14 20:12:18 UTC (rev 4735) +++ trunk/toolkits/basemap/setup.py 2007-12-14 21:16:38 UTC (rev 4736) @@ -1,4 +1,5 @@ import sys, glob, os +from distutils.core import setup major, minor1, minor2, s, tmp = sys.version_info if major==2 and minor1<=3: # setuptools monkeypatches distutils.core.Distribution to support @@ -132,16 +133,6 @@ packages = packages + ['httplib2'] package_dirs['httlib2'] = os.path.join('lib','httplib2') -if 'setuptools' in sys.modules: -# Are we running with setuptools? -# if so, need to specify all the packages in heirarchy - additional_params = {'namespace_packages' : ['matplotlib.toolkits']} - packages.extend(['matplotlib', 'matplotlib.toolkits']) - setup = setuptools.setup -else: - additional_params = {} - from distutils.core import setup - # Specify all the required mpl data pyproj_datafiles = ['data/epsg', 'data/esri', 'data/esri.extra', 'data/GL27', 'data/nad.lst', 'data/nad27', 'data/nad83', 'data/ntv2_out.dist', 'data/other.extra', 'data/pj_out27.dist', 'data/pj_out83.dist', 'data/proj_def.dat', 'data/README', 'data/td_out.dist', 'data/test27', 'data/test83', 'data/testntv2', 'data/testvarious', 'data/world'] boundaryfiles = [] @@ -175,6 +166,5 @@ packages = packages, package_dir = package_dirs, ext_modules = extensions, - package_data = package_data, - **additional_params + package_data = package_data ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-17 01:53:43
|
Revision: 4752 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4752&view=rev Author: jswhit Date: 2007-12-16 17:53:39 -0800 (Sun, 16 Dec 2007) Log Message: ----------- forgot that setuptools still needed for package_data in python 2.3 Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-12-16 23:28:59 UTC (rev 4751) +++ trunk/toolkits/basemap/setup.py 2007-12-17 01:53:39 UTC (rev 4752) @@ -1,5 +1,16 @@ import sys, glob, os from distutils.core import setup +major, minor1, minor2, s, tmp = sys.version_info +if major==2 and minor1<=3: + # setuptools monkeypatches distutils.core.Distribution to support + # package_data + try: import setuptools + except ImportError: + raise SystemExit(""" +matplotlib requires setuptools for installation. Please download +http://peak.telecommunity.com/dist/ez_setup.py and run it (as su if +you are doing a system wide install) to install the proper version of +setuptools for your system""") from distutils.core import Extension from distutils.util import convert_path import numpy This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-27 13:03:00
|
Revision: 4792 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4792&view=rev Author: jswhit Date: 2007-12-27 05:02:56 -0800 (Thu, 27 Dec 2007) Log Message: ----------- add runtime_library_dirs to _geos Extension initialization. Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-12-26 20:01:29 UTC (rev 4791) +++ trunk/toolkits/basemap/setup.py 2007-12-27 13:02:56 UTC (rev 4792) @@ -65,18 +65,18 @@ break else: geos_version = check_geosversion(GEOS_dir) -if geos_version != '"2.2.3"': - raise SystemExit(""" -Can't find geos library version 2.2.3. Please set the -environment variable GEOS_DIR to point to the location -where geos 2.2.3 is installed (for example, if geos_c.h -is in /usr/local/include, and libgeos_c is in /usr/local/lib, -set GEOS_DIR to /usr/local), or edit the setup.py script -manually and set the variable GEOS_dir (right after the line -that says "set GEOS_dir manually here".""") -else: - geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] - geos_library_dirs=[os.path.join(GEOS_dir,'lib'),os.path.join(GEOS_dir,'lib64')] +#if geos_version != '"2.2.3"': +# raise SystemExit(""" +#Can't find geos library version 2.2.3. Please set the +#environment variable GEOS_DIR to point to the location +#where geos 2.2.3 is installed (for example, if geos_c.h +#is in /usr/local/include, and libgeos_c is in /usr/local/lib, +#set GEOS_DIR to /usr/local), or edit the setup.py script +#manually and set the variable GEOS_dir (right after the line +#that says "set GEOS_dir manually here".""") +#else: +geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] +geos_library_dirs=[os.path.join(GEOS_dir,'lib'),os.path.join(GEOS_dir,'lib64')] # proj4 and geos extensions. deps = glob.glob('src/*.c') @@ -90,7 +90,11 @@ extensions.append(Extension("matplotlib.toolkits.basemap._geod",deps+['src/_geod.c'],include_dirs = ['src'],)) # for some reason, pickling won't work if this extension is installed # as "matplotlib.toolkits.basemap._geos" -extensions.append(Extension("_geos",['src/_geos.c'],library_dirs=geos_library_dirs,include_dirs=geos_include_dirs,libraries=['geos_c','geos'])) +extensions.append(Extension("_geos",['src/_geos.c'], + library_dirs=geos_library_dirs, + runtime_library_dirs=geos_library_dirs, + include_dirs=geos_include_dirs, + libraries=['geos_c','geos'])) # install shapelib and dbflib. packages = packages + ['shapelib','dbflib'] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2008-06-02 17:36:50
|
Revision: 5362 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5362&view=rev Author: jswhit Date: 2008-06-02 10:36:29 -0700 (Mon, 02 Jun 2008) Log Message: ----------- add a more helpful error message if libgeos not found. Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2008-06-02 17:13:01 UTC (rev 5361) +++ trunk/toolkits/basemap/setup.py 2008-06-02 17:36:29 UTC (rev 5362) @@ -67,19 +67,20 @@ break else: geos_version = checkversion(GEOS_dir) -#if geos_version != '"2.2.3"': -# raise SystemExit(""" -#Can't find geos library version 2.2.3. Please set the -#environment variable GEOS_DIR to point to the location -#where geos 2.2.3 is installed (for example, if geos_c.h -#is in /usr/local/include, and libgeos_c is in /usr/local/lib, -#set GEOS_DIR to /usr/local), or edit the setup.py script -#manually and set the variable GEOS_dir (right after the line -#that says "set GEOS_dir manually here".""") -#else: -geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] -geos_library_dirs=[os.path.join(GEOS_dir,'lib'),os.path.join(GEOS_dir,'lib64')] +if geos_version != '"2.2.3"' or GEOS_dir is None: + raise SystemExit(""" +Can't find geos library version 2.2.3. Please set the +environment variable GEOS_DIR to point to the location +where geos 2.2.3 is installed (for example, if geos_c.h +is in /usr/local/include, and libgeos_c is in /usr/local/lib, +set GEOS_DIR to /usr/local), or edit the setup.py script +manually and set the variable GEOS_dir (right after the line +that says "set GEOS_dir manually here".""") +else: + geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] + geos_library_dirs=[os.path.join(GEOS_dir,'lib'),os.path.join(GEOS_dir,'lib64')] + # proj4 and geos extensions. deps = glob.glob('src/*.c') deps.remove(os.path.join('src','_proj.c')) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2008-06-02 17:40:41
|
Revision: 5363 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5363&view=rev Author: jswhit Date: 2008-06-02 10:40:19 -0700 (Mon, 02 Jun 2008) Log Message: ----------- require python 2.4 Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2008-06-02 17:36:29 UTC (rev 5362) +++ trunk/toolkits/basemap/setup.py 2008-06-02 17:40:19 UTC (rev 5363) @@ -2,18 +2,8 @@ # setup.cfg for more information. import sys, glob, os, numpy major, minor1, minor2, s, tmp = sys.version_info -if major==2 and minor1<=3: - # setuptools monkeypatches distutils.core.Distribution to support - # package_data - try: import setuptools - except ImportError: - raise SystemExit(""" -matplotlib requires setuptools for installation. Please download -http://peak.telecommunity.com/dist/ez_setup.py and run it (as su if -you are doing a system wide install) to install the proper version of -setuptools for your system""") -#from distutils.core import setup -#from distutils.core import Extension +if major==2 and minor1<4 or major<2: + raise SystemExit("""matplotlib and the basemap toolkit require Python 2.4 or later.""") from numpy.distutils.core import setup, Extension from distutils.util import convert_path This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2008-06-03 03:16:57
|
Revision: 5371 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5371&view=rev Author: jswhit Date: 2008-06-02 20:16:55 -0700 (Mon, 02 Jun 2008) Log Message: ----------- don't use runtime_library_dirs on windows Modified Paths: -------------- trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2008-06-03 02:05:07 UTC (rev 5370) +++ trunk/toolkits/basemap/setup.py 2008-06-03 03:16:55 UTC (rev 5371) @@ -83,11 +83,19 @@ extensions.append(Extension("mpl_toolkits.basemap._geod",deps+['src/_geod.c'],include_dirs = ['src'],)) # for some reason, pickling won't work if this extension is installed # as "matplotlib.toolkits.basemap._geoslib" -extensions.append(Extension("_geoslib",['src/_geoslib.c'], - library_dirs=geos_library_dirs, - runtime_library_dirs=geos_library_dirs, - include_dirs=geos_include_dirs, - libraries=['geos_c','geos'])) +if sys.platform == 'win32': +# don't use runtime_library_dirs on windows (workaround +# for a distutils bug - http://bugs.python.org/issue2437). + extensions.append(Extension("_geoslib",['src/_geoslib.c'], + library_dirs=geos_library_dirs, + include_dirs=geos_include_dirs, + libraries=['geos_c','geos'])) +else: + extensions.append(Extension("_geoslib",['src/_geoslib.c'], + library_dirs=geos_library_dirs, + runtime_library_dirs=geos_library_dirs, + include_dirs=geos_include_dirs, + libraries=['geos_c','geos'])) # install shapelib and dbflib. packages = packages + ['shapelib','dbflib'] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |