-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathsetup.py
More file actions
70 lines (64 loc) · 2.07 KB
/
setup.py
File metadata and controls
70 lines (64 loc) · 2.07 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
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
# Copyright 2017-2025 Lawrence Livermore National Security, LLC and other
# Hatchet Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: MIT
from setuptools import setup, Extension
from Cython.Build import build_ext as cy_build_ext
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
# Get the version in a safe way which does not refrence hatchet `__init__` file
# per python docs: https://packaging.python.org/guides/single-sourcing-package-version/
version = {}
with open("./hatchet/version.py") as fp:
exec(fp.read(), version)
setup(
name="hatchet",
version=version["__version__"],
description="A Python library for analyzing hierarchical performance data",
url="https://github.com/hatchet/hatchet",
author="Abhinav Bhatele",
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
keywords="",
packages=[
"hatchet",
"hatchet.readers",
"hatchet.util",
"hatchet.external",
"hatchet.tests",
"hatchet.cython_modules.libs",
],
setup_requires=["cython", "setuptools"],
install_requires=[
"pydot",
"pyyaml",
"matplotlib",
"numpy",
"pandas",
"textx",
"multiprocess",
"caliper-reader",
"pycubexr; python_version >= '3.9'",
],
# TODO: the setup could be cleaner if we didn't dump the generated
# .so files into _libs
ext_modules=[
Extension(
"hatchet.cython_modules.libs.reader_modules",
["hatchet/cython_modules/reader_modules.pyx"],
),
Extension(
"hatchet.cython_modules.libs.graphframe_modules",
["hatchet/cython_modules/graphframe_modules.pyx"],
),
],
cmdclass={"build_ext": cy_build_ext},
)