Files
David Galiffi 489eda995d Rename Omnitrace to ROCm Systems Profiler (#4)
The Omnitrace program is being renamed. 

Full name: "ROCm Systems Profiler"
Package name: "rocprofiler-systems"
Binary / Library names: "rocprof-sys-*"

---------
Co-authored-by: Xuan Chen <xuchen@amd.com>
Signed-off-by: David Galiffi <David.Galiffi@amd.com>

[ROCm/rocprofiler-systems commit: d07bf508a9]
2024-10-15 11:20:40 -04:00

73 rivejä
1.9 KiB
Python

#!/usr/bin/env python3
import os
from setuptools import setup
def get_project_version():
# open "VERSION"
_cwd = os.path.dirname(__file__)
with open(os.path.join(_cwd, "source", "VERSION"), "r") as f:
data = f.read().replace("\n", "")
# make sure is string
if isinstance(data, list) or isinstance(data, tuple):
return data[0]
else:
return data
def get_long_description():
long_descript = ""
try:
long_descript = open("README.md").read()
except Exception:
long_descript = ""
return long_descript
def parse_requirements(fname="requirements.txt"):
_req = []
requirements = []
# read in the initial set of requirements
with open(fname, "r") as fp:
_req = list(filter(bool, (line.strip() for line in fp)))
# look for entries which read other files
for itr in _req:
if itr.startswith("-r "):
# read another file
for fitr in itr.split(" "):
if os.path.exists(fitr):
requirements.extend(parse_requirements(fitr))
else:
# append package
requirements.append(itr)
# return the requirements
return requirements
setup(
name="rocprof-sys-causal-viewer",
version=get_project_version(),
description="GUI for viewing causal profilers",
long_description=get_long_description(),
long_description_content_type="text/markdown",
author="AMD Research",
packages=["rocprof_sys_causal_viewer"],
package_dir={"rocprof_sys_causal_viewer": "source"},
package_data={
"rocprof_sys_causal_viewer": [
"source/assets/*",
"source/workloads/*",
"source/VERSION",
]
},
install_requires=parse_requirements(),
python_requires=">=3.6",
entry_points={
"console_scripts": [
"rocprof-sys-causal-plot=rocprof_sys_causal_viewer.__main__:main"
]
},
)