-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
51 lines (47 loc) · 1.74 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
from setuptools import setup, Extension
def extra_compile_args():
"""Returns extra compiler args for platform."""
import sys
if sys.platform == 'win32':
return ['/std:c++20', '/O2', '/DNDEBUG'] # for Visual Studio C++
return ['-std=c++20', '-O3', '-DNDEBUG']
# Define the native extension
customalloc_extension = Extension(
"customalloc",
sources=["bigO/custom_alloc.cpp"],
extra_compile_args=extra_compile_args(),
include_dirs=["bigO/include"],
)
# Call setup
setup(
name="bigO",
version="0.0.1",
description="Track asymptotic complexity in time and space.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Emery Berger",
author_email="[email protected]",
url="https://github.com/plasma-umass/bigO",
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Software Development",
"Topic :: Software Development :: Debuggers",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
],
python_requires=">=3.8",
ext_modules=[customalloc_extension],
packages=["bigO"],
package_data={"bigO": ["*.cpp", "*.h"]},
)