~ubuntu-branches/ubuntu/precise/python-keyring/precise-updates

« back to all changes in this revision

Viewing changes to extensions.py

  • Committer: Package Import Robot
  • Author(s): Carl Chenet
  • Date: 2012-02-14 12:07:30 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120214120730-ekuysup9a2s5yl9d
Tags: 0.7.1-1
* New upstream version (Closes: #656680, #624690)
* debian/control
  - Add X-Python-Version for Python 3.2
  - Add B-D for Python 3.2
  - Add unzip for B-D to repack upstream sources
  - Add python3-keyring description
  - Recommends python3-crypto for Python3 binary package
* Add python-keyring.install and python3-keyring.install files
* debian/rules
  - Execute unit tests if available
  - repack upstream sources
* debian/watch
  - New URL to catch upstream sources

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""
2
 
build_ext.py
3
 
 
4
 
Created by Kang Zhang on 2009-08-07
5
 
"""
6
 
 
7
 
import sys
8
 
 
9
 
from distutils.core import Extension
10
 
 
11
 
 
12
 
def get_extensions():
13
 
    """Collect the extensions that can be installed.
14
 
    """
15
 
    exts = []
16
 
    platform = sys.platform
17
 
 
18
 
    if platform in ['darwin', 'mac']:
19
 
        # Mac OS X, keychain enabled
20
 
        osx_keychain_module = Extension('osx_keychain',
21
 
                        library_dirs = ['/System/Library/Frameworks/'],
22
 
                        sources = ['keyring/backends/osx_keychain.c'],
23
 
                        extra_link_args = ['-framework', 'Security',
24
 
                            '-framework', 'CoreFoundation', '-framework',
25
 
                            'CoreServices'])
26
 
        exts.append(osx_keychain_module)
27
 
 
28
 
    if platform in ['win32'] and sys.getwindowsversion()[-2] == 2:
29
 
        # windows 2k+
30
 
        win32_crypto_module = Extension('win32_crypto',
31
 
                libraries = ['crypt32'],
32
 
                sources = ['keyring/backends/win32_crypto.c'],)
33
 
        exts.append(win32_crypto_module)
34
 
 
35
 
    return exts