Skip to content

Commit

Permalink
Minimal repro for jvolkman#41
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-thm committed Jul 31, 2023
1 parent 91e10c1 commit 93e6f60
Show file tree
Hide file tree
Showing 5 changed files with 1,325 additions and 2,685 deletions.
58 changes: 55 additions & 3 deletions examples/crossenv/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ _linux_x86_64 = [
"@platforms//cpu:x86_64",
]

_linux_aarch64 = [
"@platforms//os:linux",
"@platforms//cpu:arm64",
]

platform(
name = "darwin_x86_64",
constraint_values = _darwin_x86_64,
Expand All @@ -41,6 +46,11 @@ platform(
constraint_values = _linux_x86_64,
)

platform(
name = "linux_aarch64",
constraint_values = _linux_aarch64,
)

pycross_target_environment(
name = "python_darwin_x86_64",
abis = ["cp39"],
Expand Down Expand Up @@ -74,6 +84,21 @@ pycross_target_environment(
visibility = ["//visibility:public"],
)

pycross_target_environment(
name = "python_linux_aarch64",
abis = ["cp39"],
platforms = [
"linux_aarch64",
"manylinux2014_aarch64",
] + [
"manylinux_2_%s_aarch64" % str(i)
for i in range(17, 25)
],
python_compatible_with = _linux_aarch64,
version = "3.9.12",
visibility = ["//visibility:public"],
)

pycross_hermetic_toolchain(
name = "pycross_darwin_linux",
exec_interpreter = "@python3_9_aarch64-apple-darwin//:py3_runtime",
Expand All @@ -89,6 +114,21 @@ toolchain(
toolchain_type = "@jvolkman_rules_pycross//pycross:toolchain_type",
)

pycross_hermetic_toolchain(
name = "pycross_darwin_linux_aarch64",
exec_interpreter = "@python3_9_arm64-apple-darwin//:py3_runtime",
target_environment = ":python_linux_aarch64",
target_interpreter = "@python3_9_aarch64-unknown-linux-gnu//:py3_runtime",
)

toolchain(
name = "pycross_darwin_linux_aarch64_tc",
exec_compatible_with = _darwin_arm64,
target_compatible_with = _linux_aarch64,
toolchain = ":pycross_darwin_linux_aarch64",
toolchain_type = "@jvolkman_rules_pycross//pycross:toolchain_type",
)

pycross_hermetic_toolchain(
name = "pycross_darwin_darwin",
exec_interpreter = "@python3_9_x86_64-apple-darwin//:py3_runtime",
Expand Down Expand Up @@ -144,7 +184,6 @@ pycross_lock_file(
name = "example_lock",
out = "example_lock.bzl",
always_build_packages = [
"[email protected]",
"setproctitle",
],
build_target_overrides = {
Expand All @@ -165,11 +204,23 @@ pycross_lock_file(
"setuptools",
"wheel",
],
"pbr": [
"sqlalchemy": [
"setuptools",
"wheel",
],
"sqlalchemy": [
"logical-unification": [
"setuptools",
"wheel",
],
"cons": [
"setuptools",
"wheel",
],
"etuples": [
"setuptools",
"wheel",
],
"minikanren": [
"setuptools",
"wheel",
],
Expand All @@ -182,6 +233,7 @@ pycross_lock_file(
":python_darwin_x86_64",
":python_darwin_arm64",
":python_linux_x86_64",
":python_linux_aarch64",
],
)

Expand Down
1 change: 1 addition & 0 deletions examples/crossenv/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ register_toolchains(
"//:pycross_darwin_darwin_tc",
"//:pycross_linux_linux_tc",
"//:pycross_linux_darwin_tc",
"//:pycross_darwin_linux_aarch64_tc",
)
Loading

0 comments on commit 93e6f60

Please sign in to comment.