Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arg skip_audit in build wheel #5423

Merged
merged 2 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/test/try_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ -n "$index" ]; then
elif [ -d "$wheel_path" ]; then
ls -la $wheel_path
export PATH=/root/.local/bin:$PATH
python3 -m pip install piprepo --user
python3 -m pip install piprepo==0.1.3 --user
piprepo build $wheel_path
python3 -m pip install -U --user --extra-index-url file://${wheel_path}/simple ${pkg_name}
elif [ -e "$wheel_path" ]; then
Expand Down
12 changes: 12 additions & 0 deletions docker/package/manylinux/build_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def build_oneflow(
dry,
use_system_proxy,
enter_bash,
skip_audit,
):
oneflow_build_dir = os.path.join(cache_dir, "build-oneflow")
python_bin = get_python_bin(python_version)
Expand Down Expand Up @@ -268,6 +269,13 @@ def build_oneflow(
cd {oneflow_src_dir}
rm -rf build/*
{python_bin} setup.py bdist_wheel -d /tmp/tmp_wheel --build_dir {oneflow_build_dir} --package_name {package_name}
"""
if skip_audit:
bash_cmd += f"""
cp /tmp/tmp_wheel/*.whl {house_dir}
"""
else:
bash_cmd += f"""
auditwheel repair /tmp/tmp_wheel/*.whl --wheel-dir {house_dir}
"""
return create_tmp_bash_and_run(
Expand Down Expand Up @@ -329,6 +337,9 @@ def is_img_existing(tag):
parser.add_argument(
"--skip_img", default=False, action="store_true", required=False
)
parser.add_argument(
"--skip_audit", default=False, action="store_true", required=False
)
parser.add_argument(
"--use_tuna", default=False, action="store_true", required=False
)
Expand Down Expand Up @@ -484,6 +495,7 @@ def build():
args.dry,
args.use_system_proxy,
args.bash,
args.skip_audit,
)

try:
Expand Down