pygame /

#!/usr/bin/env python
# To use:
#       python install
import os.path, glob, sys
from distutils.core import setup, Extension
from distutils.extension import read_setup_file
from distutils.ccompiler import new_compiler
#from distutils.sysconfig import get_python_inc

#headers to install
headers = glob.glob(os.path.join('src', '*.h'))

#get compile info for all extensions
    extensions = read_setup_file('Setup')
except IOError:
    raise SystemExit, \
"""Need a valid "Setup" file for compiling.
Make of copy of "" end edit,
or run "" to create a new one."""

#extra files to install
data_files = []

#try to find libaries and copy them too
#(great for windows, bad for linux)
if sys.platform == 'win32':
    tempcompiler = new_compiler()
    for e in extensions:
        paths = [os.path.join(d, \
                 tempcompiler.shared_lib_format%(l, \
                     tempcompiler.shared_lib_extension)) \
                 for d in e.library_dirs for l in e.libraries]
        for p in paths:
            if os.path.isfile(p) and p not in data_files:

#don't need to actually compile the COPYLIB modules
for e in extensions[:]:
    if[:8] == 'COPYLIB_':

setup (name = "pygame",
       version = '0.2',
       maintainer = "Pete Shinners",
       maintainer_email = "",
       description = "Python Game Development module",
       url = "",

       packages = [''],
       package_dir = {'': 'lib'},
       extra_path = ('pygame/ignore', 'pygame'),

       headers = headers,
       ext_modules = extensions,
       data_files = [['pygame', data_files]]