-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
54 lines (48 loc) · 1.43 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
import setuptools
import sys
from os import environ
from Cython.Build import cythonize
from setuptools.extension import Extension
eca = []
ela = []
if environ.get('OMP'):
if sys.platform == 'win32':
eca.append('/openmp')
ela.append('/openmp')
else:
if sys.platform == 'darwin':
eca.append('-Xpreprocessor')
ela.append('-lomp')
else:
ela.append('-fopenmp')
eca.append('-fopenmp')
ext = [Extension('patlas',
sources=['patlas.pyx'],
extra_compile_args=eca,
extra_link_args=ela)]
with open('README.md', 'r') as f:
long_description = f.read()
setuptools.setup(
name='patlas',
version='0.0.7a1',
author='Alex Forrence',
author_email='[email protected]',
description='Simple texture atlas packer',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/aforren1/patlas',
packages=setuptools.find_packages(),
entry_points = {
'console_scripts': [
'patlas = _patlas.util:main'
]
},
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
ext_modules=cythonize(ext,
compiler_directives={'language_level': 3},
annotate=True)
)