Skip to content

Commit

Permalink
Merge pull request #985 from ivanov/alternative-to-982
Browse files Browse the repository at this point in the history
Support current and future FreeBSD releases in the setupext.py build script.
  • Loading branch information
pelson committed Jul 13, 2012
2 parents f6b7f28 + c28e8d7 commit 97b3166
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions setupext.py
Expand Up @@ -47,31 +47,23 @@
import re
import subprocess
from distutils import sysconfig, version

basedir = {
from collections import defaultdict

# basedir is a dictionary keyed by sys.platform, and on most platforms it is
# set to ['/usr/local', '/usr']. Giving this defaultdict a factory that
# returns this default removes the need to update this code every time a new
# version of freebsd comes out, for example, provided that the default basedir
# remains sufficient on that platform
basedir = defaultdict(lambda: ['/usr/local', '/usr'], {
# execptions to the ['/usr/local', '/usr'] defaults
'win32' : ['win32_static',],
'linux2-alpha' : ['/usr/local', '/usr'],
'linux2-hppa' : ['/usr/local', '/usr'],
'linux2-mips' : ['/usr/local', '/usr'],
'linux2-sparc' : ['/usr/local', '/usr'],
'linux2' : ['/usr/local', '/usr'],
'linux3' : ['/usr/local', '/usr'],
'linux' : ['/usr/local', '/usr',],
'cygwin' : ['/usr/local', '/usr',],
'darwin' : ['/usr/local/', '/usr', '/usr/X11'],
'freebsd4' : ['/usr/local', '/usr'],
'freebsd5' : ['/usr/local', '/usr'],
'freebsd6' : ['/usr/local', '/usr'],
'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',],
'gnukfreebsd5' : ['/usr/local', '/usr'],
'gnukfreebsd6' : ['/usr/local', '/usr'],
'gnukfreebsd7' : ['/usr/local', '/usr'],
'gnukfreebsd8' : ['/usr/local', '/usr'],
'gnu0' : ['/usr'],
'aix5' : ['/usr/local'],
}
})

import sys, os, stat
import sys

from textwrap import fill
from distutils.core import Extension
Expand Down

0 comments on commit 97b3166

Please sign in to comment.