mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Fix the python package name issue (#4207)
Fix the package package name issue. In my last change(#4197) about enabling code sign. I forgot to pass the additional flags to setup.py,
This commit is contained in:
parent
87d68d8531
commit
6f4320fb85
2 changed files with 26 additions and 14 deletions
|
|
@ -41,6 +41,7 @@ jobs:
|
|||
- template: templates/set-featurizer-build-flag-step.yml
|
||||
parameters:
|
||||
is_featurizers_build: $(is_featurizers_build)
|
||||
is_nightly_build: $(NIGHTLY_BUILD)
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
|
|
@ -102,6 +103,7 @@ jobs:
|
|||
- template: templates/set-featurizer-build-flag-step.yml
|
||||
parameters:
|
||||
is_featurizers_build: $(is_featurizers_build)
|
||||
is_nightly_build: $(NIGHTLY_BUILD)
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
|
|
@ -170,6 +172,7 @@ jobs:
|
|||
- template: templates/set-featurizer-build-flag-step.yml
|
||||
parameters:
|
||||
is_featurizers_build: $(is_featurizers_build)
|
||||
is_nightly_build: $(NIGHTLY_BUILD)
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'setup env'
|
||||
|
|
@ -203,16 +206,16 @@ jobs:
|
|||
# Esrp signing
|
||||
- template: templates/win-esrp-dll.yml
|
||||
parameters:
|
||||
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
||||
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\onnxruntime\capi'
|
||||
DisplayName: 'ESRP - Sign Native dlls'
|
||||
DoEsrp: true
|
||||
Pattern: '*.pyd'
|
||||
Pattern: '*.pyd,*.dll'
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'Build wheel'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\setup.py'
|
||||
arguments: 'bdist_wheel'
|
||||
arguments: bdist_wheel $(WheelBuildFlag)
|
||||
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
||||
|
||||
- task: CopyFiles@2
|
||||
|
|
@ -288,6 +291,7 @@ jobs:
|
|||
- template: templates/set-featurizer-build-flag-step.yml
|
||||
parameters:
|
||||
is_featurizers_build: $(is_featurizers_build)
|
||||
is_nightly_build: $(NIGHTLY_BUILD)
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'build'
|
||||
|
|
@ -299,16 +303,16 @@ jobs:
|
|||
# Esrp signing
|
||||
- template: templates/win-esrp-dll.yml
|
||||
parameters:
|
||||
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
||||
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\onnxruntime\capi'
|
||||
DisplayName: 'ESRP - Sign Native dlls'
|
||||
DoEsrp: true
|
||||
Pattern: '*.pyd'
|
||||
Pattern: '*.pyd,*.dll'
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'Build wheel'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\setup.py'
|
||||
arguments: 'bdist_wheel'
|
||||
arguments: bdist_wheel --use_cuda $(WheelBuildFlag)
|
||||
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
||||
|
||||
- task: CopyFiles@2
|
||||
|
|
@ -350,6 +354,7 @@ jobs:
|
|||
- template: templates/set-featurizer-build-flag-step.yml
|
||||
parameters:
|
||||
is_featurizers_build: $(is_featurizers_build)
|
||||
is_nightly_build: $(NIGHTLY_BUILD)
|
||||
|
||||
- task: UsePythonVersion@0
|
||||
displayName: 'Use Python'
|
||||
|
|
@ -381,6 +386,7 @@ jobs:
|
|||
workspace:
|
||||
clean: all
|
||||
pool: 'Linux-CPU'
|
||||
condition: ne(variables['is_featurizers_build'], 'true')
|
||||
strategy:
|
||||
matrix:
|
||||
Py37:
|
||||
|
|
@ -393,6 +399,11 @@ jobs:
|
|||
python.include: '3.5m'
|
||||
cp.tag: 'cp35-cp35m'
|
||||
steps:
|
||||
- template: templates/set-featurizer-build-flag-step.yml
|
||||
parameters:
|
||||
is_featurizers_build: $(is_featurizers_build)
|
||||
is_nightly_build: $(NIGHTLY_BUILD)
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: |
|
||||
|
|
@ -419,15 +430,11 @@ jobs:
|
|||
sudo tar -Jxf $(Build.BinariesDirectory)/toolchains.tar.xz -C /mnt/toolchains
|
||||
aria2c -q https://github.com/protocolbuffers/protobuf/releases/download/v3.11.1/protoc-3.11.1-linux-x86_64.zip
|
||||
unzip protoc-3.11.1-linux-x86_64.zip
|
||||
aria2c -q https://github.com/Kitware/CMake/releases/download/v3.17.1/cmake-3.17.1-Linux-x86_64.tar.gz
|
||||
tar --strip=1 -zxf cmake-3.17.1-Linux-x86_64.tar.gz
|
||||
sudo cp /mnt/toolchains/manylinux2014_aarch64/usr/include/stdlib.h /mnt/toolchains/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/
|
||||
bin/cmake -Donnxruntime_GCC_STATIC_CPP_RUNTIME=ON -DCMAKE_BUILD_TYPE=Release -Dprotobuf_WITH_ZLIB=OFF -DCMAKE_TOOLCHAIN_FILE=tool-chain.cmake -Donnxruntime_ENABLE_PYTHON=ON -DPYTHON_LIBRARY=dl -DPYTHON_EXECUTABLE=/mnt/toolchains/manylinux2014_aarch64/opt/python/'$(cp.tag)'/bin/python3 -Donnxruntime_BUILD_SHARED_LIB=OFF -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_DEV_MODE=ON -DONNX_CUSTOM_PROTOC_EXECUTABLE=$(Build.BinariesDirectory)/bin/protoc "-DPYTHON_INCLUDE_DIR=/mnt/toolchains/manylinux2014_aarch64/usr/include;/mnt/toolchains/manylinux2014_aarch64/opt/python/$(cp.tag)/include/python$(python.include)" -DNUMPY_INCLUDE_DIR=/mnt/toolchains $(Build.SourcesDirectory)/cmake
|
||||
cmake -Donnxruntime_GCC_STATIC_CPP_RUNTIME=ON -DCMAKE_BUILD_TYPE=Release -Dprotobuf_WITH_ZLIB=OFF -DCMAKE_TOOLCHAIN_FILE=tool-chain.cmake -Donnxruntime_ENABLE_PYTHON=ON -DPYTHON_LIBRARY=dl -DPYTHON_EXECUTABLE=/mnt/toolchains/manylinux2014_aarch64/opt/python/'$(cp.tag)'/bin/python3 -Donnxruntime_BUILD_SHARED_LIB=OFF -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_DEV_MODE=ON -DONNX_CUSTOM_PROTOC_EXECUTABLE=$(Build.BinariesDirectory)/bin/protoc "-DPYTHON_INCLUDE_DIR=/mnt/toolchains/manylinux2014_aarch64/usr/include;/mnt/toolchains/manylinux2014_aarch64/opt/python/$(cp.tag)/include/python$(python.include)" -DNUMPY_INCLUDE_DIR=/mnt/toolchains $(Build.SourcesDirectory)/cmake
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
case $NIGHTLY_BUILD in
|
||||
1) sudo --preserve-env docker run -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -v $(Build.BinariesDirectory):/tmp/a -v $(Build.SourcesDirectory):/tmp/b -w /tmp/a -u $(id -u ${USER}):$(id -g ${USER}) --rm quay.io/pypa/manylinux2014_aarch64 /opt/python/'$(cp.tag)'/bin/python3 /tmp/b/setup.py bdist_wheel --nightly_build;;
|
||||
*) sudo --preserve-env docker run -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -v $(Build.BinariesDirectory):/tmp/a -v $(Build.SourcesDirectory):/tmp/b -w /tmp/a -u $(id -u ${USER}):$(id -g ${USER}) --rm quay.io/pypa/manylinux2014_aarch64 /opt/python/'$(cp.tag)'/bin/python3 /tmp/b/setup.py bdist_wheel;;
|
||||
esac
|
||||
sudo --preserve-env docker run -e BUILD_BUILDNUMBER -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -v $(Build.BinariesDirectory):/tmp/a -v $(Build.SourcesDirectory):/tmp/b -w /tmp/a -u $(id -u ${USER}):$(id -g ${USER}) --rm quay.io/pypa/manylinux2014_aarch64 /opt/python/'$(cp.tag)'/bin/python3 /tmp/b/setup.py bdist_wheel $(WheelBuildFlag)
|
||||
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: ONNXRuntime python wheel'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
parameters:
|
||||
is_featurizers_build: false
|
||||
is_nightly_build: 0
|
||||
|
||||
steps:
|
||||
- task: PythonScript@0
|
||||
|
|
@ -13,5 +14,9 @@ steps:
|
|||
flags = "--use_featurizers --wheel_name_suffix=featurizer"
|
||||
else:
|
||||
flags = ""
|
||||
|
||||
print("##vso[task.setvariable variable=FeaturizerBuildFlag]%s" % flags)
|
||||
|
||||
if "${{ parameters.is_nightly_build }}" == "1":
|
||||
flags = flags + " --nightly_build"
|
||||
|
||||
print("##vso[task.setvariable variable=WheelBuildFlag]%s" % flags)
|
||||
|
|
|
|||
Loading…
Reference in a new issue