Skip to content

Commit a658e8f

Browse files
committed
add some todo, fake some more values
1 parent 799f9c3 commit a658e8f

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

python/private/pypi/dependency_specifier_flag.bzl

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,26 @@ def _impl(ctx):
2121
# likely to be true.
2222
env["implementation_name"] = runtime.implementation_name or "cpython"
2323

24+
# todo: map from os constraint
2425
env["os_name"] = struct()
26+
27+
# todo: map from os constraint
28+
env["sys_platform"] = struct()
29+
30+
# todo: map from cpu flag (x86_64, etc)
2531
env["platform_machine"] = struct()
26-
env["platform_python_implementation"] = struct()
32+
33+
# todo: add PyRuntimeInfo.platform_python_implementation
34+
# The values are slightly different to implementation_name
35+
env["platform_python_implementation"] = runtime.implementation_name
36+
37+
# todo: add flag to carry this
2738
env["platform_release"] = struct()
39+
40+
# todo: map from os constraint
2841
env["platform_system"] = struct()
42+
43+
# todo: add flag to carry this
2944
env["platform_version"] = struct()
3045

3146
if evalute(ctx.attr.expression, env):
@@ -58,8 +73,6 @@ pypa_dependency_specification = rule(
5873
"expression": attt.string(),
5974
"_os_name": attr.label(),
6075
"_sys_platform_flag": attr.label(),
61-
"_platform_machine_flag": attr.label(),
62-
"_platform_python_implementation_flag": attr.label(),
6376
"_platform_release_flag": attr.label(),
6477
"_platform_system_flag": attr.label(),
6578
"_platform_version_flag": attr.label(),

0 commit comments

Comments
 (0)