Replace setup.py with pyproject.toml (#9021)
* Create pyproject.toml * Implement a custom build backend (see below) in packager directory. Build logic from setup.py has been refactored and migrated into the new backend. * Tested: pip wheel . (build wheel), python -m build --sdist . (source distribution)
This commit is contained in:
committed by
GitHub
parent
a7b3dd3176
commit
a5cd2412de
@@ -18,7 +18,7 @@ $command_wrapper bash -c "cd build && ctest --extra-verbose"
|
||||
|
||||
echo "--- Build binary wheel"
|
||||
$command_wrapper bash -c \
|
||||
"cd python-package && rm -rf dist/* && python setup.py bdist_wheel --universal"
|
||||
"cd python-package && rm -rf dist/* && pip wheel --no-deps -v . --wheel-dir dist/"
|
||||
$command_wrapper python tests/ci_build/rename_whl.py python-package/dist/*.whl \
|
||||
${BUILDKITE_COMMIT} ${WHEEL_TAG}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ $command_wrapper tests/ci_build/build_via_cmake.sh -DCMAKE_PREFIX_PATH=/opt/grpc
|
||||
-DNCCL_LIBRARY=/workspace/libnccl_static.a ${arch_flag}
|
||||
echo "--- Build binary wheel"
|
||||
$command_wrapper bash -c \
|
||||
"cd python-package && rm -rf dist/* && python setup.py bdist_wheel --universal"
|
||||
"cd python-package && rm -rf dist/* && pip wheel --no-deps -v . --wheel-dir dist/"
|
||||
$command_wrapper python tests/ci_build/rename_whl.py python-package/dist/*.whl \
|
||||
${BUILDKITE_COMMIT} ${WHEEL_TAG}
|
||||
|
||||
|
||||
@@ -24,21 +24,17 @@ if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
|
||||
Write-Host "--- Build binary wheel"
|
||||
cd ../python-package
|
||||
conda activate
|
||||
& python setup.py bdist_wheel --universal
|
||||
& pip install --user -v "pip>=23"
|
||||
& pip --version
|
||||
& pip wheel --no-deps -v . --wheel-dir dist/
|
||||
Get-ChildItem . -Filter dist/*.whl |
|
||||
Foreach-Object {
|
||||
& python ../tests/ci_build/rename_whl.py $_.FullName $Env:BUILDKITE_COMMIT win_amd64
|
||||
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
|
||||
}
|
||||
|
||||
Write-Host "--- Insert vcomp140.dll (OpenMP runtime) into the wheel"
|
||||
cd dist
|
||||
Copy-Item -Path ../../tests/ci_build/insert_vcomp140.py -Destination .
|
||||
& python insert_vcomp140.py *.whl
|
||||
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
|
||||
|
||||
Write-Host "--- Upload Python wheel"
|
||||
cd ../..
|
||||
cd ..
|
||||
Get-ChildItem . -Filter python-package/dist/*.whl |
|
||||
Foreach-Object {
|
||||
& buildkite-agent artifact upload python-package/dist/$_
|
||||
|
||||
Reference in New Issue
Block a user