@@ -74,16 +74,18 @@ pip = use_extension("//python/extensions:pip.bzl", "pip")
7474 env = {"platform_version" : "0" },
7575 os_name = "linux" ,
7676 platform = "linux_{}" .format (cpu ),
77+ whl_abi_tags = [
78+ "abi3" ,
79+ "cp{major}{minor}" ,
80+ ],
81+ whl_platform_tags = [
82+ "linux_{}" .format (cpu ),
83+ "manylinux_*_{}" .format (cpu ),
84+ ],
7785 )
7886 for cpu in [
7987 "x86_64" ,
8088 "aarch64" ,
81- # TODO @aignas 2025-05-19: only leave tier 0-1 cpus when stabilizing the
82- # `pip.default` extension. i.e. drop the below values - users will have to
83- # define themselves if they need them.
84- "arm" ,
85- "ppc" ,
86- "s390x" ,
8789 ]
8890]
8991
@@ -99,26 +101,53 @@ pip = use_extension("//python/extensions:pip.bzl", "pip")
99101 env = {"platform_version" : "14.0" },
100102 os_name = "osx" ,
101103 platform = "osx_{}" .format (cpu ),
104+ whl_abi_tags = [
105+ "abi3" ,
106+ "cp{major}{minor}" ,
107+ ],
108+ whl_platform_tags = [
109+ "macosx_*_{}" .format (suffix )
110+ for suffix in platform_tag_cpus
111+ ],
102112 )
103- for cpu in [
104- "aarch64" ,
105- "x86_64" ,
106- ]
113+ for cpu , platform_tag_cpus in {
114+ "aarch64" : [
115+ "universal2" ,
116+ "arm64" ,
117+ ],
118+ "x86_64" : [
119+ "universal2" ,
120+ "x86_64" ,
121+ ],
122+ }.items ()
123+ ]
124+
125+ [
126+ pip .default (
127+ arch_name = cpu ,
128+ config_settings = [
129+ "@platforms//cpu:{}" .format (cpu ),
130+ "@platforms//os:windows" ,
131+ ],
132+ env = {"platform_version" : "0" },
133+ os_name = "windows" ,
134+ platform = "windows_{}" .format (cpu ),
135+ whl_abi_tags = [
136+ "abi3" ,
137+ "cp{major}{minor}" ,
138+ ],
139+ whl_platform_tags = whl_platform_tags ,
140+ )
141+ for cpu , whl_platform_tags in {
142+ "x86_64" : ["win_amd64" ],
143+ }.items ()
107144]
108145
109- pip .default (
110- arch_name = "x86_64" ,
111- config_settings = [
112- "@platforms//cpu:x86_64" ,
113- "@platforms//os:windows" ,
114- ],
115- env = {"platform_version" : "0" },
116- os_name = "windows" ,
117- platform = "windows_x86_64" ,
118- )
119146pip .parse (
120147 # NOTE @aignas 2024-10-26: We have an integration test that depends on us
121148 # being able to build sdists for this hub, so explicitly set this to False.
149+ #
150+ # how do we test sdists? Maybe just worth adding a single sdist somewhere?
122151 download_only = False ,
123152 experimental_index_url = "https://pypi.org/simple" ,
124153 hub_name = "rules_python_publish_deps" ,
0 commit comments