File tree Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 3
3
Here, we customize the tag of the generated wheels.
4
4
"""
5
5
6
- import sysconfig
7
6
from typing import Any , Dict
8
7
9
8
from hatchling .builders .hooks .plugin .interface import BuildHookInterface
9
+ from packaging .tags import platform_tags
10
10
11
11
12
12
def get_tag () -> str :
13
13
"""Get appropriate wheel tag according to system"""
14
- tag_platform = sysconfig . get_platform (). replace ( "-" , "_" ). replace ( "." , "_" )
15
- return f"py3-none-{ tag_platform } "
14
+ platform_tag = next ( platform_tags () )
15
+ return f"py3-none-{ platform_tag } "
16
16
17
17
18
18
class CustomBuildHook (BuildHookInterface ):
Original file line number Diff line number Diff line change 1
1
[build-system ]
2
2
requires = [
3
- " hatchling>=1.12.1"
3
+ " hatchling>=1.12.1" ,
4
+ " packaging>=21.3" ,
4
5
]
5
6
backend-path = [" ." ]
6
7
build-backend = " packager.pep517"
@@ -30,7 +31,7 @@ classifiers = [
30
31
dependencies = [
31
32
" numpy" ,
32
33
" scipy" ,
33
- " nvidia-nccl-cu12 ; platform_system == 'Linux' and platform_machine != 'aarch64'"
34
+ " nvidia-nccl-cu12 ; platform_system == 'Linux' and platform_machine != 'aarch64'" ,
34
35
]
35
36
36
37
[project .urls ]
Original file line number Diff line number Diff line change 1
1
diff --git python-package/pyproject.toml python-package/pyproject.toml
2
- index 8835def25..46c1451c2 100644
2
+ index 20d3f9974..953087ff4 100644
3
3
--- python-package/pyproject.toml
4
4
+++ python-package/pyproject.toml
5
- @@ -30,8 +30,7 @@ classifiers = [
6
- ]
5
+ @@ -30,7 +30,6 @@ classifiers = [
7
6
dependencies = [
8
7
"numpy",
9
- - "scipy",
10
- - "nvidia-nccl-cu12 ; platform_system == 'Linux' and platform_machine != 'aarch64'"
11
- + "scipy"
8
+ "scipy",
9
+ - "nvidia-nccl-cu12 ; platform_system == 'Linux' and platform_machine != 'aarch64'",
12
10
]
13
11
14
12
[project.urls]
You can’t perform that action at this time.
0 commit comments