Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dali_tf_plugin/make_dali_tf_sdist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cmake .. \
-DTIMESTAMP=${DALI_TIMESTAMP} \
-DGIT_SHA=${GIT_SHA}
make -j install
python setup.py sdist
python -m build --sdist --no-isolation
mkdir -p /dali_tf_sdist
cp dist/*.tar.gz /dali_tf_sdist
popd
2 changes: 1 addition & 1 deletion docker/Dockerfile.make_sdist_plugins
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM ${BASE_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y python3 python3-pip build-essential git wget && \
python3 -m pip install "setuptools>=70" scikit-build && \
python3 -m pip install "setuptools>=70" build scikit-build && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /root/.cache/pip/

Expand Down
12 changes: 6 additions & 6 deletions docker/build_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ bundle_wheel() {

if [ "${BUILD_PYTHON}" = "ON" ]; then
# use stored as a compression method to make it faster as bundle-wheel.sh need to repack anyway
# call setup.py to avoid slow copy to tmp dir
# avoid isolated venv creation and use dependencies already installed in the image
pushd dali/python
Comment thread
JanuszL marked this conversation as resolved.
python setup.py bdist_wheel \
--verbose \
--compression=stored \
--python-tag=py3 \
--plat-name=${WHL_PLATFORM_NAME}
python -m build --wheel --no-isolation \
-C--global-option=--verbose \
-C--build-option=--compression=stored \
-C--build-option=--python-tag=py3 \
-C--build-option="--plat-name=${WHL_PLATFORM_NAME}"
popd
mv dali/python/dist/*.whl ./

Expand Down
3 changes: 2 additions & 1 deletion plugins/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def require(req_spec: str) -> None:
sys.exit(1)

if __name__ == "__main__":
if len(sys.argv) > 1 and sys.argv[1] != 'sdist':
# PEP 517 uses egg_info to query requirements before creating an sdist.
if len(sys.argv) > 1 and sys.argv[1] not in ('sdist', 'egg_info'):
try:
os.environ['DALI_PRELOAD_PLUGINS'] = "" # no need to load plugins
import nvidia.dali as dali
Expand Down
2 changes: 1 addition & 1 deletion plugins/video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ add_custom_command(
TARGET dali-plugin-video
POST_BUILD
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkg_src
COMMAND ${PYTHON_EXECUTABLE} setup.py sdist)
COMMAND ${PYTHON_EXECUTABLE} -m build --sdist --no-isolation)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkg_src/dist
DESTINATION . FILES_MATCHING PATTERN "*.tar.gz")