Skip to content

Commit 9fda1c1

Browse files
committed
wip
1 parent bc15dcd commit 9fda1c1

7 files changed

Lines changed: 157 additions & 43 deletions

File tree

BUILD.bazel

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ load("@rules_python_gazelle_plugin//modules_mapping:def.bzl", "modules_mapping")
99
compile_pip_requirements(
1010
name = "requirements",
1111
src = "requirements.in",
12-
requirements_txt = "requirements_lock.txt",
12+
python_version = "3.11",
13+
requirements_txt = "requirements_linux.lock",
14+
requirements_darwin = "requirements_darwin.lock",
15+
# requirements_linux = "requirements_linux.lock",
1316
)
1417

1518
modules_mapping(
@@ -26,7 +29,7 @@ gazelle_python_manifest(
2629
name = "gazelle_python_manifest",
2730
modules_mapping = ":modules_map",
2831
pip_repository_name = "pypi",
29-
requirements = "//:requirements_lock.txt",
32+
# requirements = "//:requirements_lock.txt",
3033
)
3134

3235
gazelle_binary(

MODULE.bazel

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use_repo(
4646
"buildifier_prebuilt_toolchains",
4747
)
4848

49-
DEFAULT_PYTHON = "3.13.1"
49+
DEFAULT_PYTHON = "3.11"
5050

5151
HUB_NAME = "pypi"
5252

@@ -63,6 +63,40 @@ pip.parse(
6363
download_only = True,
6464
hub_name = HUB_NAME,
6565
python_version = DEFAULT_PYTHON,
66-
requirements_lock = "//:requirements_lock.txt",
66+
# requirements_lock = "//:requirements_lock.txt",
67+
requirements_linux = "//:requirements_linux.lock",
68+
requirements_darwin = "//:requirements_darwin.lock",
6769
)
6870
use_repo(pip, HUB_NAME)
71+
72+
# remote execution
73+
bazel_dep(name = "toolchains_buildbuddy")
74+
75+
git_override(
76+
module_name = "toolchains_buildbuddy",
77+
commit = "66146a3015faa348391fcceea2120caa390abe03",
78+
remote = "https://github.com/buildbuddy-io/buildbuddy-toolchain.git",
79+
)
80+
81+
# Use the extension to create toolchain and platform targets
82+
buildbuddy = use_extension("@toolchains_buildbuddy//:extensions.bzl", "buildbuddy")
83+
84+
# buildbuddy = use_extension("@buildbuddy//:extensions.bzl", "buildbuddy")
85+
86+
use_repo(buildbuddy, "buildbuddy_toolchain")
87+
88+
bazel_dep(name = "hermetic_cc_toolchain", version = "3.2.0")
89+
90+
toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains")
91+
use_repo(toolchains, "zig_sdk")
92+
93+
# register_toolchains(
94+
# "@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.31",
95+
# "@zig_sdk//libc_aware/toolchain:linux_arm64_gnu.2.31",
96+
# # "@zig_sdk//toolchain:windows_amd64",
97+
# # "@zig_sdk//toolchain:windows_arm64",
98+
# "@zig_sdk//toolchain:darwin_amd64",
99+
# "@zig_sdk//toolchain:darwin_arm64",
100+
# )
101+
102+
bazel_dep(name = "rules_pycross", version = "0.8.0")

requirements_linux.lock

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
4+
#
5+
# bazel run //:requirements.update
6+
#
7+
numpy==2.2.3 \
8+
--hash=sha256:0391ea3622f5c51a2e29708877d56e3d276827ac5447d7f45e9bc4ade8923c52 \
9+
--hash=sha256:12c045f43b1d2915eca6b880a7f4a256f59d62df4f044788c8ba67709412128d \
10+
--hash=sha256:136553f123ee2951bfcfbc264acd34a2fc2f29d7cdf610ce7daf672b6fbaa693 \
11+
--hash=sha256:1402da8e0f435991983d0a9708b779f95a8c98c6b18a171b9f1be09005e64d9d \
12+
--hash=sha256:16372619ee728ed67a2a606a614f56d3eabc5b86f8b615c79d01957062826ca8 \
13+
--hash=sha256:1ad78ce7f18ce4e7df1b2ea4019b5817a2f6a8a16e34ff2775f646adce0a5027 \
14+
--hash=sha256:1b416af7d0ed3271cad0f0a0d0bee0911ed7eba23e66f8424d9f3dfcdcae1304 \
15+
--hash=sha256:1f45315b2dc58d8a3e7754fe4e38b6fce132dab284a92851e41b2b344f6441c5 \
16+
--hash=sha256:2376e317111daa0a6739e50f7ee2a6353f768489102308b0d98fcf4a04f7f3b5 \
17+
--hash=sha256:23c9f4edbf4c065fddb10a4f6e8b6a244342d95966a48820c614891e5059bb50 \
18+
--hash=sha256:246535e2f7496b7ac85deffe932896a3577be7af8fb7eebe7146444680297e9a \
19+
--hash=sha256:2e8da03bd561504d9b20e7a12340870dfc206c64ea59b4cfee9fceb95070ee94 \
20+
--hash=sha256:34c1b7e83f94f3b564b35f480f5652a47007dd91f7c839f404d03279cc8dd021 \
21+
--hash=sha256:39261798d208c3095ae4f7bc8eaeb3481ea8c6e03dc48028057d3cbdbdb8937e \
22+
--hash=sha256:3b787adbf04b0db1967798dba8da1af07e387908ed1553a0d6e74c084d1ceafe \
23+
--hash=sha256:3c2ec8a0f51d60f1e9c0c5ab116b7fc104b165ada3f6c58abf881cb2eb16044d \
24+
--hash=sha256:435e7a933b9fda8126130b046975a968cc2d833b505475e588339e09f7672890 \
25+
--hash=sha256:4d8335b5f1b6e2bce120d55fb17064b0262ff29b459e8493d1785c18ae2553b8 \
26+
--hash=sha256:4d9828d25fb246bedd31e04c9e75714a4087211ac348cb39c8c5f99dbb6683fe \
27+
--hash=sha256:52659ad2534427dffcc36aac76bebdd02b67e3b7a619ac67543bc9bfe6b7cdb1 \
28+
--hash=sha256:5266de33d4c3420973cf9ae3b98b54a2a6d53a559310e3236c4b2b06b9c07d4e \
29+
--hash=sha256:5521a06a3148686d9269c53b09f7d399a5725c47bbb5b35747e1cb76326b714b \
30+
--hash=sha256:596140185c7fa113563c67c2e894eabe0daea18cf8e33851738c19f70ce86aeb \
31+
--hash=sha256:5b732c8beef1d7bc2d9e476dbba20aaff6167bf205ad9aa8d30913859e82884b \
32+
--hash=sha256:5ebeb7ef54a7be11044c33a17b2624abe4307a75893c001a4800857956b41094 \
33+
--hash=sha256:712a64103d97c404e87d4d7c47fb0c7ff9acccc625ca2002848e0d53288b90ea \
34+
--hash=sha256:7678556eeb0152cbd1522b684dcd215250885993dd00adb93679ec3c0e6e091c \
35+
--hash=sha256:77974aba6c1bc26e3c205c2214f0d5b4305bdc719268b93e768ddb17e3fdd636 \
36+
--hash=sha256:783145835458e60fa97afac25d511d00a1eca94d4a8f3ace9fe2043003c678e4 \
37+
--hash=sha256:7bfdb06b395385ea9b91bf55c1adf1b297c9fdb531552845ff1d3ea6e40d5aba \
38+
--hash=sha256:7c8dde0ca2f77828815fd1aedfdf52e59071a5bae30dac3b4da2a335c672149a \
39+
--hash=sha256:83807d445817326b4bcdaaaf8e8e9f1753da04341eceec705c001ff342002e5d \
40+
--hash=sha256:87eed225fd415bbae787f93a457af7f5990b92a334e346f72070bf569b9c9c95 \
41+
--hash=sha256:8fb62fe3d206d72fe1cfe31c4a1106ad2b136fcc1606093aeab314f02930fdf2 \
42+
--hash=sha256:95172a21038c9b423e68be78fd0be6e1b97674cde269b76fe269a5dfa6fadf0b \
43+
--hash=sha256:9f48ba6f6c13e5e49f3d3efb1b51c8193215c42ac82610a04624906a9270be6f \
44+
--hash=sha256:a0c03b6be48aaf92525cccf393265e02773be8fd9551a2f9adbe7db1fa2b60f1 \
45+
--hash=sha256:a5ae282abe60a2db0fd407072aff4599c279bcd6e9a2475500fc35b00a57c532 \
46+
--hash=sha256:aee2512827ceb6d7f517c8b85aa5d3923afe8fc7a57d028cffcd522f1c6fd082 \
47+
--hash=sha256:c8b0451d2ec95010d1db8ca733afc41f659f425b7f608af569711097fd6014e2 \
48+
--hash=sha256:c9aa4496fd0e17e3843399f533d62857cef5900facf93e735ef65aa4bbc90ef0 \
49+
--hash=sha256:cbc6472e01952d3d1b2772b720428f8b90e2deea8344e854df22b0618e9cce71 \
50+
--hash=sha256:cdfe0c22692a30cd830c0755746473ae66c4a8f2e7bd508b35fb3b6a0813d787 \
51+
--hash=sha256:cf802eef1f0134afb81fef94020351be4fe1d6681aadf9c5e862af6602af64ef \
52+
--hash=sha256:d42f9c36d06440e34226e8bd65ff065ca0963aeecada587b937011efa02cdc9d \
53+
--hash=sha256:d5b47c440210c5d1d67e1cf434124e0b5c395eee1f5806fdd89b553ed1acd0a3 \
54+
--hash=sha256:d9b4a8148c57ecac25a16b0e11798cbe88edf5237b0df99973687dd866f05e1b \
55+
--hash=sha256:daf43a3d1ea699402c5a850e5313680ac355b4adc9770cd5cfc2940e7861f1bf \
56+
--hash=sha256:dbdc15f0c81611925f382dfa97b3bd0bc2c1ce19d4fe50482cb0ddc12ba30020 \
57+
--hash=sha256:deaa09cd492e24fd9b15296844c0ad1b3c976da7907e1c1ed3a0ad21dded6f76 \
58+
--hash=sha256:e37242f5324ffd9f7ba5acf96d774f9276aa62a966c0bad8dae692deebec7716 \
59+
--hash=sha256:ed2cf9ed4e8ebc3b754d398cba12f24359f018b416c380f577bbae112ca52fc9 \
60+
--hash=sha256:f2712c5179f40af9ddc8f6727f2bd910ea0eb50206daea75f58ddd9fa3f715bb \
61+
--hash=sha256:f4ca91d61a4bf61b0f2228f24bbfa6a9facd5f8af03759fe2a655c50ae2c6610 \
62+
--hash=sha256:f6b3dfc7661f8842babd8ea07e9897fe3d9b69a1d7e5fbb743e4160f9387833b
63+
# via -r requirements.in

sortcpp/BUILD.bazel

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ pybind_extension(
1111
],
1212
)
1313

14-
py_test(
15-
name = "sortcpp_test",
16-
size = "small",
17-
srcs = ["sortcpp_test.py"],
18-
imports = [".."],
19-
python_version = "PY3",
20-
tags = ["unit"],
21-
deps = [":sortcpp"],
22-
)
14+
2315

2416
py_library(
2517
name = "sortcpp",
@@ -33,34 +25,44 @@ py_library(
3325
visibility = ["//visibility:private"],
3426
)
3527

36-
py_package(
37-
name = "sortcpp_pkg",
38-
visibility = ["//visibility:private"],
39-
deps = [
40-
":sortcpp",
41-
],
42-
)
28+
# py_test(
29+
# name = "sortcpp_test",
30+
# size = "small",
31+
# srcs = ["sortcpp_test.py"],
32+
# imports = [".."],
33+
# python_version = "PY3",
34+
# tags = ["unit"],
35+
# deps = [":sortcpp"],
36+
# )
4337

44-
py_wheel(
45-
name = "wheel",
46-
author = "Alexei Dudko",
47-
classifiers = [
48-
"Programming Language :: Python :: 3",
49-
"Operating System :: OS Specific",
50-
"Topic :: CPP",
51-
],
52-
distribution = "sortcpp",
53-
platform = select({
54-
"@bazel_tools//src/conditions:windows_x64": "win_amd64",
55-
"@bazel_tools//src/conditions:windows_arm64": "win_arm64",
56-
"@bazel_tools//src/conditions:darwin_x86_64": "macosx_14_0_x86_64",
57-
"@bazel_tools//src/conditions:darwin_arm64": "macosx_14_0_arm64",
58-
"@bazel_tools//src/conditions:linux_x86_64": "linux_x86_64",
59-
"@bazel_tools//src/conditions:linux_aarch64": "linux_aarch64",
60-
}),
61-
python_requires = ">=3.8",
62-
version = "0.0.1",
63-
deps = [
64-
":sortcpp_pkg",
65-
],
66-
)
38+
# py_package(
39+
# name = "sortcpp_pkg",
40+
# visibility = ["//visibility:private"],
41+
# deps = [
42+
# ":sortcpp",
43+
# ],
44+
# )
45+
46+
# py_wheel(
47+
# name = "wheel",
48+
# author = "Alexei Dudko",
49+
# classifiers = [
50+
# "Programming Language :: Python :: 3",
51+
# "Operating System :: OS Specific",
52+
# "Topic :: CPP",
53+
# ],
54+
# distribution = "sortcpp",
55+
# platform = select({
56+
# "@bazel_tools//src/conditions:windows_x64": "win_amd64",
57+
# "@bazel_tools//src/conditions:windows_arm64": "win_arm64",
58+
# "@bazel_tools//src/conditions:darwin_x86_64": "macosx_14_0_x86_64",
59+
# "@bazel_tools//src/conditions:darwin_arm64": "macosx_14_0_arm64",
60+
# "@bazel_tools//src/conditions:linux_x86_64": "linux_x86_64",
61+
# "@bazel_tools//src/conditions:linux_aarch64": "linux_aarch64",
62+
# }),
63+
# python_requires = ">=3.8",
64+
# version = "0.0.1",
65+
# deps = [
66+
# ":sortcpp_pkg",
67+
# ],
68+
# )

sortcpp/main/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary")
2+
3+
cc_binary(
4+
name = "main",
5+
srcs = ["main.cpp"],
6+
)

sortcpp/main/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <iostream>
2+
3+
int main() {
4+
std::cout << "Hello, world!" << std::endl;
5+
return 0;
6+
}

0 commit comments

Comments
 (0)