-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (41 loc) · 1.38 KB
/
setup.py
File metadata and controls
51 lines (41 loc) · 1.38 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
# Copyright(C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
from setuptools import setup, find_packages
import os
# Path to the directory of this setup.py file
setup_dir = os.path.dirname(os.path.abspath(__file__))
# Path to the ryzers package
ryzer_dir = os.path.join(setup_dir, 'ryzers')
# Path to the __init__.py file in the ryzers package
init_file = os.path.join(ryzer_dir, '__init__.py')
if os.name == 'nt': # Windows
setup_dir = setup_dir.replace('\\', '\\\\')
# Read the current contents of the file
with open(init_file, 'r') as file:
lines = file.readlines()
# Modify the line starting with RYZER_PACKAGES_PATH =
with open(init_file, 'w') as file:
for line in lines:
if line.startswith('RYZER_PACKAGES_PATH ='):
line = f'RYZER_PACKAGES_PATH = "{setup_dir}"\n'
file.write(line)
setup(
name="ryzers",
version="1.0",
description="A tool to Manage and Build Dockerfiles for Ryzen AI Applications.",
packages=find_packages(),
entry_points={
'console_scripts': [
'ryzers = ryzers.entrypoint:main',
],
},
install_requires=[
'pyyaml',
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.8',
)