ayh015 commited on
Commit
ff582c5
·
verified ·
1 Parent(s): 51cccdb

Upload setup.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. setup.py +57 -0
setup.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ import sys
5
+ import platform
6
+
7
+ from setuptools import find_packages, setup
8
+ from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
9
+
10
+
11
+ def _fetch_requirements(path):
12
+ with open(path, "r") as fd:
13
+ return [r.strip() for r in fd.readlines() if r.strip() and not r.startswith("#")]
14
+
15
+
16
+ # Custom wheel class to modify the wheel name
17
+ class bdist_wheel(_bdist_wheel):
18
+ def finalize_options(self):
19
+ _bdist_wheel.finalize_options(self)
20
+ self.root_is_pure = False
21
+
22
+ def get_tag(self):
23
+ python_version = f"cp{sys.version_info.major}{sys.version_info.minor}"
24
+ abi_tag = f"{python_version}"
25
+
26
+ if platform.system() == "Linux":
27
+ platform_tag = "manylinux1_x86_64"
28
+ else:
29
+ platform_tag = platform.system().lower()
30
+
31
+ return python_version, abi_tag, platform_tag
32
+
33
+
34
+ # Setup configuration
35
+ setup(
36
+ author="slime Team",
37
+ name="slime",
38
+ version="0.1.0",
39
+ packages=find_packages(include=["slime*", "slime_plugins*"]),
40
+ include_package_data=True,
41
+ install_requires=_fetch_requirements("requirements.txt"),
42
+ extras_require={
43
+ "fsdp": [
44
+ "torch>=2.0",
45
+ ]
46
+ },
47
+ python_requires=">=3.10",
48
+ classifiers=[
49
+ "Programming Language :: Python :: 3.10",
50
+ "Programming Language :: Python :: 3.11",
51
+ "Programming Language :: Python :: 3.12",
52
+ "Environment :: GPU :: NVIDIA CUDA",
53
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
54
+ "Topic :: System :: Distributed Computing",
55
+ ],
56
+ cmdclass={"bdist_wheel": bdist_wheel},
57
+ )