~bzr/ubuntu/hardy/dulwich/bzr-ppa

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Max Bowsher
  • Date: 2011-04-13 02:38:04 UTC
  • mfrom: (422.1.3 jaunty)
  • Revision ID: maxb@f2s.com-20110413023804-z8qeztdka3qlh19m
Tags: 0.7.1-1~bazaar1~hardy1
Merge 0.7.1-1 and make tweaks re undoing use of dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    from distutils.core import setup, Extension
9
9
from distutils.core import Distribution
10
10
 
11
 
dulwich_version_string = '0.7.0'
 
11
dulwich_version_string = '0.7.1'
12
12
 
13
13
include_dirs = []
14
14
# Windows MSVC support
 
15
import os
15
16
import sys
16
17
if sys.platform == 'win32':
17
18
    include_dirs.append('dulwich')
32
33
 
33
34
    pure = False
34
35
 
35
 
        
 
36
def runcmd(cmd, env):
 
37
    import subprocess
 
38
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
 
39
                         stderr=subprocess.PIPE, env=env)
 
40
    out, err = p.communicate()
 
41
    err = [e for e in err.splitlines()
 
42
           if not e.startswith('Not trusting file') \
 
43
              and not e.startswith('warning: Not importing')]
 
44
    if err:
 
45
        return ''
 
46
    return out
 
47
 
 
48
 
 
49
if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
 
50
    # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
 
51
    # distutils.sysconfig
 
52
    version = runcmd(['/usr/bin/xcodebuild', '-version'], {}).splitlines()[0]
 
53
    # Also parse only first digit, because 3.2.1 can't be parsed nicely
 
54
    if (version.startswith('Xcode') and
 
55
        int(version.split()[1].split('.')[0]) >= 4):
 
56
        os.environ['ARCHFLAGS'] = '-arch i386 -arch x86_64'
 
57
 
36
58
setup(name='dulwich',
37
 
      description='Pure-Python Git Library',
 
59
      description='Python Git Library',
38
60
      keywords='git',
39
61
      version=dulwich_version_string,
40
62
      url='http://samba.org/~jelmer/dulwich',
43
65
      author='Jelmer Vernooij',
44
66
      author_email='jelmer@samba.org',
45
67
      long_description="""
46
 
      Simple Pure-Python implementation of the Git file formats and
 
68
      Simple Python implementation of the Git file formats and
47
69
      protocols. Dulwich is the place where Mr. and Mrs. Git live
48
70
      in one of the Monty Python sketches.
 
71
 
 
72
      All functionality is available in pure Python, but (optional)
 
73
      C extensions are also available for better performance.
49
74
      """,
50
75
      packages=['dulwich', 'dulwich.tests'],
51
76
      scripts=['bin/dulwich', 'bin/dul-daemon', 'bin/dul-web'],