-
Notifications
You must be signed in to change notification settings - Fork 77
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
Allow old packages to default to setup.py-based build #5076
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Apr 10, 2024
joecummings
added a commit
to pytorch/torchtune
that referenced
this pull request
Apr 10, 2024
Currently using pytorch/test-infra#5076 ref, will need to set to main once it merges
atalman
reviewed
Apr 10, 2024
atalman
reviewed
Apr 10, 2024
@@ -168,20 +173,33 @@ jobs: | |||
repository: ${{ inputs.repository }} | |||
script: ${{ inputs.pre-script }} | |||
- name: Install python build dependency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we refactor it like this ?
- name: Build the wheel (python-build-package)
if: ${{ inputs.build-platform == 'python-build-package' }}
run: |
set -euxo pipefail
# shellcheck disable=SC1090
source "${BUILD_ENV_FILE}"
# shellcheck disable=SC2086
${CONDA_RUN} python -m pip install build
export PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
${CONDA_RUN} python -m build --wheel
- name: Build the wheel (setup-py)
if: ${{ inputs.build-platform == 'setup-py' }}
working-directory: ${{ inputs.repository }}
shell: bash -l {0}
run: |
set -euxo pipefail
source "${BUILD_ENV_FILE}"
${CONDA_RUN} python setup.py clean
export PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
${CONDA_RUN} python setup.py bdist_wheel
and remove old Build the wheel (bdist_wheel)
joecummings
force-pushed
the
default-build-command
branch
from
April 10, 2024 14:34
4b67f9f
to
7e53b4b
Compare
atalman
approved these changes
Apr 10, 2024
atalman
pushed a commit
that referenced
this pull request
Oct 1, 2024
This PR enable the build of M1 wheels to rely on `python -m build` instead of `python setup.py`. The default is still `python setup.py`. This is the same as #5071 and #5076 that were landed for linux wheels. We need this for torchcodec to support M1 wheels pytorch/torchcodec#230 CC @scotts @atalman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was brought up here that various workflows may still be reliant on the old way of installing python packages (invoking setup.py directly).
While these workflows should enable their packages to work with
build
eventually, they should have ample time to do so. Therefore, this change established a default for the build command on Linux workflows. Therefore, newer packages can start to specifypython -m build --wheel
, without disrupting the other workflows reliant on Nova.