forked from abarnert/appscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
50 lines (45 loc) · 1.24 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
try:
from setuptools import setup, Extension
except ImportError:
print("Note: couldn't import setuptools so using distutils instead.")
from distutils.core import setup, Extension
import os, sys
if sys.version_info >= (3,0):
root_dir = 'py-appscript/trunk/appscript_3x'
else:
root_dir = 'py-appscript/trunk/appscript_2x'
setup(
name = "appscript",
version = "1.0.0",
description = "Control AppleScriptable applications from Python.",
url='http://appscript.sourceforge.net',
license='Public Domain',
platforms=['Mac OS X'],
ext_modules = [
Extension('aem.ae',
sources=[os.path.join(root_dir, 'ext/ae.c')],
extra_compile_args=['-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4'],
extra_link_args=[
'-framework', 'CoreFoundation',
'-framework', 'ApplicationServices',
'-framework', 'Carbon'],
),
],
packages = [
'aem',
'appscript',
],
py_modules=[
'mactypes',
'osax',
],
extra_path = "aeosa",
package_dir = {'': os.path.join(root_dir, 'lib')},
classifiers = [
'License :: Public Domain',
'Development Status :: 5 - Production/Stable',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
)