This repository has been archived by the owner on Sep 28, 2019. It is now read-only.
forked from lace/lace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
60 lines (54 loc) · 2.17 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
# Conversion from Markdown to pypi's restructured text: https://coderwall.com/p/qawuyq -- Thanks James.
import os
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
long_description = ''
print('warning: pandoc or pypandoc does not seem to be installed; using empty long_description')
import importlib
try: # pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # pip <= 9.0.3
from pip.req import parse_requirements
from setuptools import setup, Extension
import numpy as np
install_requires = parse_requirements('requirements.txt', session=False)
install_requires = [str(ir.req) for ir in install_requires]
setup(
name='metabolace',
version=importlib.import_module('lace').__version__,
author='Body Labs',
author_email='[email protected]',
description='Active fork of lace, the Body Labs-developed polygonal mesh library',
long_description=long_description,
url='https://github.com/metabolize/lace',
license='MIT',
packages=[
'lace',
'lace.serialization',
'lace.serialization.obj',
'lace.serialization.ply'
],
ext_modules=[
Extension('lace.serialization.ply.plyutils',
sources=[os.path.join('lace/serialization/ply', x) for x in ['plyutils.c', 'rply.c']],
depends=[os.path.join('lace/serialization/ply', x) for x in ['plyutils.c', 'plyutils.h', 'rply.c', 'rply.h', 'rplyfile.h']],
),
Extension('lace.serialization.obj.objutils',
sources=['lace/serialization/obj/objutils.cpp'],
depends=['lace/serialization/obj/objutils.cpp'],
include_dirs=[np.get_include()],
extra_compile_args=['-O2', '-Wno-write-strings', '-Wno-c++11-narrowing', '-std=c++0x'], # maybe skip these on Windows?
),
],
install_requires=install_requires,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
]
)