+26
-6
lines changedFilter options
+26
-6
lines changed Original file line number Diff line number Diff line change
@@ -299,24 +299,28 @@ pkg_tar(
299
299
}),
300
300
)
301
301
302
+
sh_binary(
303
+
name = "setup_wrapper",
304
+
srcs = ["setup_wrapper.sh"],
305
+
data = [requirement("setuptools")],
306
+
visibility = ["//visibility:private"],
307
+
)
308
+
302
309
genrule(
303
310
name = "source_wheel",
304
311
srcs = [":source_tarball"],
305
312
outs = ["protobuf-%s.tar.gz" % PROTOBUF_PYTHON_VERSION],
306
313
cmd = """
307
-
export PYTHONPATH=$$PWD/external/protobuf_pip_deps_setuptools/site-packages
308
314
set -eux
309
315
tar -xzvf $(location :source_tarball)
310
-
cd protobuf/
311
-
python3 setup.py sdist
312
-
cd ..
316
+
$(location :setup_wrapper) sdist
313
317
mv protobuf/dist/*.tar.gz $@
314
318
""",
315
319
target_compatible_with = select({
316
320
"@system_python//:none": ["@platforms//:incompatible"],
317
321
"//conditions:default": [],
318
322
}),
319
-
tools = [requirement("setuptools")],
323
+
tools = [":setup_wrapper"],
320
324
)
321
325
322
326
py_wheel(
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
1
+
#!/bin/bash
2
+
set -eux
3
+
4
+
# Find the setuptools directory and add it to PYTHONPATH
5
+
SETUPTOOLS_PATH=$(find $PWD -name "setuptools" -type d | grep site-packages | head -1)
6
+
if [ -z "$SETUPTOOLS_PATH" ]; then
7
+
echo "Warning: Could not find setuptools directory"
8
+
else
9
+
SITE_PACKAGES_DIR=$(dirname "$SETUPTOOLS_PATH")
10
+
echo "Using setuptools from: $SITE_PACKAGES_DIR"
11
+
export PYTHONPATH="$SITE_PACKAGES_DIR"
12
+
fi
13
+
14
+
# Run setup.py with the arguments passed to this script
15
+
cd protobuf/
16
+
python3 setup.py "$@"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1
1
numpy<=2.1.0
2
-
setuptools<=70.3.0
2
+
setuptools<=78.1.1
3
3
absl-py==2.*
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4