[Gdal-dev] Windows installer for Python.

Cherkashin Evgeny eugeneai at icc.ru
Wed Jan 22 23:11:48 EST 2003


Hi!

I've just made a windows installer setup.py for pymod library.
One drawback is that the package is installed in the subdirectory and 
developer shoud import modules like this:
import gdal.gdal
or
import gdal.ogr

In the pcakage I included gdal118.dll too. So, the package could be 
distributed stand-alone expecially for Python developers.

The files in the attachment should be placed into "pymod" directory.
Later I'll develop the setup package to support Linux.


Evgeniy
-------------- next part --------------
#!/usr/bin/env python

import string
from distutils.core import setup, Extension

#
# debug
#
#import sys
#sys.argv.append("build")

f=open("..\\version")
v=f.read()
f.close()
del f

version=v.strip()
dllversion=version.replace(".","")

SOURCES=["gdal_wrap.c", "gdalnumeric.cpp", "numpydataset.cpp"]
INCLUDE_DIRS=["..\\core", "..\\port", "..\\ogr", ] # only necessary
LIBRARIES = ["gdal_i"]
LIBRARY_DIRS = [".."]
DLL="gdal%s.dll" % dllversion

setup (name = "Pyhton GDAL",
       version = version,
       description = "Geospatial Data Abstraction Library: Python Bindings",
       author = "Frank Warmerdam",
       #packager = "Evgeniy Cherkashin",
       author_email = "warmerda at home.com",
       #packager_email = "eugeneai at icc.ru",
       url = "http://www.remotesensing.org/.../gdal/",	# I've forgot the rest
       
       
       
       packages = ['gdal'],
       package_dir = {'gdal': ''},

       ext_modules = [Extension('gdal._gdal',
			sources = SOURCES,
			include_dirs = INCLUDE_DIRS,
			libraries = LIBRARIES,
			library_dirs = LIBRARY_DIRS
			),
		],
		data_files = [("", [DLL])]
	)

-------------- next part --------------
# stub


More information about the Gdal-dev mailing list