~ubuntu-branches/ubuntu/karmic/pygame/karmic

« back to all changes in this revision

Viewing changes to config.py

  • Committer: Bazaar Package Importer
  • Author(s): Joe Wreschnig
  • Date: 2005-09-15 15:10:45 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050915151045-6j7tiaorbf42xqia
Tags: 1.7.1release-1
* New upstream release.
* Remove 64-bit patch from 1.6-0.2, merged upstream.
* Remove SMPEG detection patch from 1.4-1, no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
import sys, os, shutil, string
19
19
 
20
 
 
21
 
 
22
 
if sys.platform == 'win32':
 
20
def is_msys_mingw():
 
21
    if os.environ.has_key("MSYSTEM"):
 
22
        if os.environ["MSYSTEM"] == "MINGW32":
 
23
            return 1
 
24
    return 0
 
25
 
 
26
 
 
27
if sys.platform == 'win32' and not is_msys_mingw():
23
28
    print 'Using WINDOWS configuration...\n'
24
29
    import config_win
25
30
    CFG = config_win
 
31
elif sys.platform == 'win32' and is_msys_mingw():
 
32
    print 'Using WINDOWS mingw/msys configuration...\n'
 
33
    import config_msys
 
34
    CFG = config_msys
26
35
elif sys.platform == 'darwin':
27
36
    print 'Using Darwin configuration...\n'
28
37
    import config_darwin
105
114
 
106
115
def main():
107
116
    if os.path.isfile('Setup'):
108
 
        if confirm('Backup existing "Setup" file'):
 
117
        if "-auto" in sys.argv or confirm('Backup existing "Setup" file'):
109
118
            shutil.copyfile('Setup', 'Setup.bak')
110
 
    if os.path.isdir('build'):
 
119
    if not "-auto" in sys.argv and os.path.isdir('build'):
111
120
        if confirm('Remove old build directory (force recompile)'):
112
121
            shutil.rmtree('build', 0)
113
122