forked from paulross/PythonExtensionPatterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
70 lines (64 loc) · 2.69 KB
/
setup.py
File metadata and controls
70 lines (64 loc) · 2.69 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
""" Usage:
python3 setup.py build
Created on May 30, 2013
@author: paulross
"""
import os
DEBUG = True
extra_compile_args=["-std=c99", ]
if DEBUG:
extra_compile_args += ["-g3", "-O0", "-DDEBUG=1",]
else:
extra_compile_args += ["-DNDEBUG", "-Os"]
from distutils.core import setup, Extension
setup(
name = 'cPyExtPatt',
version = '0.1.0',
author = 'Paul Ross',
author_email = 'cpipdev@gmail.com',
maintainer = 'Paul Ross',
maintainer_email = 'cpipdev@gmail.com',
description = 'Python Extension Patterns.',
long_description = """Examples of good and bad practice with Python Extensions.""",
platforms = ['Mac OSX', 'POSIX',],
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python',
'Topic :: Programming',
],
license = 'GNU General Public License v2 (GPLv2)',
ext_modules=[
Extension("cExceptions", sources=['cExceptions.c',],
include_dirs = ['/usr/local/include',], # os.path.join(os.getcwd(), 'include'),],
library_dirs = [os.getcwd(),], # path to .a or .so file(s)
extra_compile_args=extra_compile_args,
),
Extension("cModuleGlobals", sources=['cModuleGlobals.c',],
include_dirs = ['/usr/local/include',], # os.path.join(os.getcwd(), 'include'),],
library_dirs = [os.getcwd(),], # path to .a or .so file(s)
extra_compile_args=extra_compile_args,
),
Extension("cObj", sources=['cObjmodule.c',],
include_dirs = ['/usr/local/include',], # os.path.join(os.getcwd(), 'include'),],
library_dirs = [os.getcwd(),], # path to .a or .so file(s)
extra_compile_args=extra_compile_args,
),
Extension("cParseArgs", sources=['cParseArgs.c',],
include_dirs = ['/usr/local/include',], # os.path.join(os.getcwd(), 'include'),],
library_dirs = [os.getcwd(),], # path to .a or .so file(s)
extra_compile_args=extra_compile_args,
),
Extension("cPyRefs", sources=['cPyRefs.c',],
include_dirs = ['/usr/local/include',], # os.path.join(os.getcwd(), 'include'),],
library_dirs = [os.getcwd(),], # path to .a or .so file(s)
#libraries = ['jpeg',],
extra_compile_args=extra_compile_args,
),
]
)