-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
71 lines (53 loc) · 1.65 KB
/
setup.py
File metadata and controls
71 lines (53 loc) · 1.65 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
71
#!/usr/bin/env python3
import os
import sys
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
with open('./lib/__init__.py') as src:
ver = [line.split("'")[1] for line in src.readlines()
if line.startswith('__version__')][0]
with open('README.rst') as file:
long_descr = file.read()
sources = ['drafterpy.c', ]
depends = ['drafterpy.c', ]
libdirs = []
macros = []
incldirs = []
if sys.platform == 'darwin':
libdirs.append('/usr/local/lib')
incldirs.append('/usr/local/include')
macros.append(('MACOSX', 1))
sources = [os.path.join('src', s) for s in sources]
depends = [os.path.join('src', d) for d in depends]
libs = ['drafter']
extension = Extension(
'drafterpy._drafter',
libraries=libs,
sources=sources,
depends=depends,
define_macros=macros,
library_dirs=libdirs)
setup(
name='DrafterPy',
version=ver,
ext_modules=[extension],
description='Python bindings for libdrafter',
long_description=long_descr,
platforms=['any'],
author='menecio',
author_email='aristobulo@gmail.com',
url='https://github.com/menecio/drafterpy',
package_dir={'drafterpy': 'lib', },
packages=['drafterpy', ],
license='MIT License',
keywords=['python3', 'api-blueprint', ],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: Unix',
'Programming Language :: C',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules', ], )