-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
77 lines (67 loc) · 1.97 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
77
import os
from setuptools import Extension, find_packages, setup
optlevel = os.environ.get('JLIST_OPTLEVEL', '3')
cxxflags = [
'-Wall',
'-Wextra',
'-Wno-missing-field-initializers',
'-std=gnu++17',
'-march=native',
'-mtune=native',
'-O' + optlevel,
]
if True or optlevel == '0':
cxxflags.append('-g')
if not os.environ.get('JLIST_ALL_COMPILE_ERRORS', False):
cxxflags.append('-fmax-errors=15')
ldflags = []
if int(os.environ.get('JLIST_UBSAN', False)):
cxxflags.append('-fsanitize=undefined')
ldflags.append('-fsanitize=undefined')
def extension(name, sources, depends=None):
return Extension(
name,
sources,
include_dirs=['.'],
language='c++',
extra_compile_args=cxxflags,
extra_link_args=ldflags,
depends=depends or [],
)
setup(
name='jlist',
version='0.1.0',
description='A list type that can store unboxed primitive values.',
author='Joe Jevnik',
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
url='https://github.com/llllllllll/jlist',
license='Apache 2.0',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: C++',
'Operating System :: POSIX',
'Topic :: Software Development',
'Topic :: Utilities',
],
ext_modules=[
extension(
'jlist.jlist',
['jlist/jlist.cc'],
depends=['jlist/jlist.h'],
),
extension(
'jlist.ops',
['jlist/ops.cc'],
depends=['jlist/jlist.h'],
),
],
)