source: trunk/module/setup.py @ 62

Last change on this file since 62 was 62, checked in by D'Arcy J.M. Cain, 18 years ago

Add missing comma.

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/usr/bin/env python
2
3# Setup script for the PyGreSQL version 3
4# created 2000/04 Mark Alexander <mwa@gate.net>
5# tweaked 2000/05 Jeremy Hylton <jeremy@cnri.reston.va.us>
6# win32 support 2001/01 Gerhard Haering <gerhard@bigfoot.de>
7
8# requires distutils; standard in Python 1.6, otherwise download from
9# http://www.python.org/sigs/distutils-sig/download.html
10
11# You may have to change the first 3 variables (include_dirs,
12# library_dirs, optional_libs) to match your postgres distribution.
13
14# Now, you can:
15#   python setup.py build   # to build the module
16#   python setup.py install # to install it
17
18# See http://www.python.org/sigs/distutils-sig/doc/ for more information
19# on using distutils to install Python programs.
20
21from distutils.core import setup
22from distutils.extension import Extension
23import sys
24
25if sys.platform == "win32":
26        # If you want to build from source; you must have built a win32 native libpq    # before and copied libpq.dll into the PyGreSQL root directory.
27        win_pg_build_root = 'd:/dev/pg/postgresql-7.0.2/'
28        include_dirs=[ win_pg_build_root + 'src/include', win_pg_build_root + '/src/include/libpq', win_pg_build_root + 'src', win_pg_build_root + 'src/interfaces/libpq' ]
29        library_dirs=[ win_pg_build_root + 'src/interfaces/libpq/Release' ]
30        optional_libs=[ 'libpqdll', 'wsock32', 'advapi32' ]
31        data_files = [ 'libpq.dll' ]
32else:
33        include_dirs=['/usr/include/pgsql']
34        library_dirs=['usr/lib/pgsql']
35        optional_libs=['pq']
36        data_files = []
37
38setup (name = "PyGreSQL",
39        version = "3.1",
40        description = "Python PostgreSQL Interfaces",
41        author = "D'Arcy J. M. Cain",
42        author_email = "darcy@druid.net",
43        url = "http://www.druid.net/pygresql/",
44        licence = "Python",
45
46        py_modules = ['pg', 'pgdb'],
47        ext_modules = [ Extension(
48                name='_pg',
49                sources = ['pgmodule.c'],
50                include_dirs = include_dirs,
51                library_dirs = library_dirs,
52                libraries = optional_libs
53        )],
54        data_files = data_files
55)
56
Note: See TracBrowser for help on using the repository browser.