~jelmer/dulwich/lp-pqm

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-01 22:13:51 UTC
  • mfrom: (413.11.554)
  • Revision ID: jelmer@samba.org-20120201221351-b3n2p9zttzh62dwu
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
    has_setuptools = False
11
11
from distutils.core import Distribution
12
12
 
13
 
dulwich_version_string = '0.8.2'
 
13
dulwich_version_string = '0.8.4'
14
14
 
15
15
include_dirs = []
16
16
# Windows MSVC support
35
35
 
36
36
    pure = False
37
37
 
38
 
def runcmd(cmd, env):
39
 
    import subprocess
40
 
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
41
 
                         stderr=subprocess.PIPE, env=env)
42
 
    out, err = p.communicate()
43
 
    err = [e for e in err.splitlines()
44
 
           if not e.startswith('Not trusting file') \
45
 
              and not e.startswith('warning: Not importing')]
46
 
    if err:
47
 
        return ''
48
 
    return out
49
 
 
50
 
 
51
38
if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
52
39
    # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
53
40
    # distutils.sysconfig
54
 
    version = runcmd(['/usr/bin/xcodebuild', '-version'], {}).splitlines()[0]
55
 
    # Also parse only first digit, because 3.2.1 can't be parsed nicely
56
 
    if (version.startswith('Xcode') and
57
 
        int(version.split()[1].split('.')[0]) >= 4):
58
 
        os.environ['ARCHFLAGS'] = ''
 
41
    import subprocess
 
42
    p = subprocess.Popen(
 
43
        ['/usr/bin/xcodebuild', '-version'], stdout=subprocess.PIPE,
 
44
        stderr=subprocess.PIPE, env={})
 
45
    out, err = p.communicate()
 
46
    for l in out.splitlines():
 
47
        # Also parse only first digit, because 3.2.1 can't be parsed nicely
 
48
        if (l.startswith('Xcode') and
 
49
            int(l.split()[1].split('.')[0]) >= 4):
 
50
            os.environ['ARCHFLAGS'] = ''
59
51
 
60
52
setup_kwargs = {}
61
53