-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
37 lines (33 loc) · 1.13 KB
/
setup.py
File metadata and controls
37 lines (33 loc) · 1.13 KB
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
import os
import sys
from setuptools import setup, Extension, find_packages
from Cython.Build import cythonize
import numpy
# get the version information
version_dict = {}
with open("tinygraph/version.py") as fp:
exec(fp.read(), version_dict)
__version__ = version_dict['__version__']
COMPILE_ARGS = ["-O3", '-std=c++17', '-g',
'-fno-omit-frame-pointer', '-fPIC', '-g3', ]
LD_FLAGS = []
fastutil_sourcefiles = ["tinygraph/fastutils.pyx"]
extensions = [Extension("tinygraph.fastutils", fastutil_sourcefiles,
include_dirs=[numpy.get_include()],
language="c++",
extra_compile_args=COMPILE_ARGS,
extra_link_args = LD_FLAGS, )]
setup(
name='tinygraph',
version=__version__,
description='Lightweight Python library for small graphs',
url='https://github.com/thejonaslab/tinygraph',
license='MIT',
packages=find_packages(),
# install_requires=[
# 'Cython>=0.29.21',
# 'numpy>=1.19.2',
# ],
ext_modules = cythonize(extensions, language_level = "3"),
include_package_data=True,
)