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

fix wheel build, make extension first to ensure binaries are inlined, then assemble wheel #1679

Merged
merged 2 commits into from
Dec 23, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ parameters:
- bash: yarn --frozen-lockfile
displayName: "Install Javascript Dependencies"

- name: pythonInitSteps
type: stepList
default:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
Expand All @@ -56,6 +59,12 @@ parameters:
displayName: "Install Python base dependencies"
condition: succeeded()

- name: wasmInitSteps
type: stepList
default:
- bash: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
displayName: "Install wasm-pack"

- name: linuxInitSteps
type: stepList
default:
Expand Down Expand Up @@ -233,6 +242,7 @@ jobs:

steps:
- ${{ parameters.initSteps }}
- ${{ parameters.wasmInitSteps }}
- ${{ parameters.linuxInitSteps }}
- ${{ parameters.webassemblySteps }}

Expand Down Expand Up @@ -363,6 +373,7 @@ jobs:

steps:
- ${{ parameters.initSteps }}
- ${{ parameters.pythonInitSteps }}
- ${{ parameters.pythonBuildDockerSteps }}
- ${{ parameters.pythonCoverageSteps }}
- ${{ parameters.pythonLinuxWheelSteps }}
Expand Down Expand Up @@ -405,6 +416,7 @@ jobs:

steps:
- ${{ parameters.initSteps }}
- ${{ parameters.pythonInitSteps }}
- ${{ parameters.windowsInitSteps }}
- ${{ parameters.pythonBuildVS2019Steps }}

Expand Down Expand Up @@ -432,6 +444,7 @@ jobs:

steps:
- ${{ parameters.initSteps }}
- ${{ parameters.pythonInitSteps }}
- ${{ parameters.windowsInitSteps }}
- ${{ parameters.pythonWindowsWheelVS2019Steps }}

Expand Down Expand Up @@ -465,6 +478,7 @@ jobs:

steps:
- ${{ parameters.initSteps }}
- ${{ parameters.pythonInitSteps }}
- ${{ parameters.macInitSteps }}
- ${{ parameters.pythonBuildSteps }}
- ${{ parameters.pythonCoverageSteps }}
Expand All @@ -483,6 +497,7 @@ jobs:

steps:
- ${{ parameters.initSteps }}
- ${{ parameters.pythonInitSteps }}
- ${{ parameters.macInitSteps }}
- ${{ parameters.pythonBuildSteps }}
- ${{ parameters.pythonCoverageSteps }}
Expand Down Expand Up @@ -510,15 +525,8 @@ jobs:
- bash: yarn --frozen-lockfile
displayName: "Install Javascript Dependencies"

- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
architecture: "x64"
displayName: "Use Python $(python.version)"

- bash: python -m pip install --upgrade pip wheel setuptools jupyterlab numpy "pyarrow>=5" "black==20.8b1" flake8-black
displayName: "Install Python base dependencies"
condition: succeeded()
- ${{ parameters.pythonInitSteps }}
- ${{ parameters.wasmInitSteps }}

- task: DownloadPipelineArtifact@2
displayName: "Download Python 3.7 Perspective Wheel"
Expand Down
5 changes: 1 addition & 4 deletions python/perspective/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ include Makefile

# Source files for perspective-python
graft perspective
include perspective/table/*.so
include perspective/table/*.dll
include perspective/table/*.dylib
include perspective/table/*.pyd
recursive-include perspective/table/

graft perspective/tests

Expand Down
6 changes: 3 additions & 3 deletions scripts/_wheel_python.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ try {
cmd += `rm -rf build/ &&`;

// now build the wheel in place
cmd += `${PYTHON} setup.py bdist_wheel`;
cmd += `${PYTHON} setup.py build_ext bdist_wheel`;

// Use auditwheel on Linux - repaired wheels are in
// `python/perspective/wheelhouse`.
Expand All @@ -87,11 +87,11 @@ try {
} else if (IS_MACOS) {
// Don't need to do any cleaning here since we will reuse the cmake
// cache and numpy paths from the pep-517/518 build in build_python.js
cmd += `${PYTHON} setup.py bdist_wheel`;
cmd += `${PYTHON} setup.py build_ext bdist_wheel`;
cmd += " && mkdir -p ./wheelhouse && cp -v ./dist/*.whl ./wheelhouse";
} else {
// Windows
cmd += `${PYTHON} setup.py bdist_wheel`;
cmd += `${PYTHON} setup.py build_ext bdist_wheel`;
}

// TODO: MacOS wheel processed with delocate segfaults on
Expand Down