-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
76 lines (66 loc) · 1.92 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import Extension, setup
from Cython.Build import cythonize
VERSION = '1.0.1'
extra_objects = [
'lib/libemoji.a',
]
extra_compile_args = [
'-std=c11',
'-Wall',
'-Wextra',
]
extra_link_args = []
libraries = []
if sys.platform.startswith('darwin'):
extra_link_args.extend([
'-framework', 'CoreFoundation',
'-framework', 'CoreGraphics',
'-framework', 'CoreText',
'-framework', 'CoreServices',
])
elif sys.platform.startswith('linux'):
libraries.extend([
'dl',
'fontconfig',
'freetype',
'GL',
'GLU',
])
def main():
extension = Extension(
'emojilib',
sources=['src/emojilib.pyx'],
include_dirs=['include'],
extra_objects=extra_objects,
libraries=libraries,
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
language='c11'
)
setup(
name='emojilib',
version=VERSION,
description='Ultimate Emoji Generator library using Skia and Python C Extension',
url='https://github.com/emoji-gen/emojilib',
author='Emoji Generator',
author_email='[email protected]',
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Programming Language :: Cython',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
ext_modules=cythonize([extension])
)
if __name__ == '__main__':
main()