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

[lit][ci] Publish lit wheels #88072

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

seldridge
Copy link
Member

Add wheel publishing in addition to existing source distribution publishing of lit.

Fixes #63369. This also uses the exact fix proposed by @EFord36 in #63369.

I was testing it on my branch (with a further modified version of CI that avoids some of the problematic GitHub Actions steps for a fork and adds debug information about what was built) only to make sure that this produces the expected files. That can be observed here: https://github.com/seldridge/llvm-project/actions/runs/8608056297/job/23589700846#step:7:1 There would now be a lit-18.1.0-py3-none-any.whl in addition to a lit-18.1.0.tar.gz.

My use case for this is slightly different from #63369. I would like to use lit for an internal project. However, the internal project uses a build system which doesn't have support for building source dependencies except when using --no-use-pep517. lit, however, specifies a build-backend in its pyproject.toml which pip treats as explicit opt-in to pep517 even when the command line opt-out is provided.

Add wheel publishing in addition to existing source distribution
publishing of lit.

Fixes llvm#63369.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@llvmbot
Copy link
Collaborator

llvmbot commented Apr 9, 2024

@llvm/pr-subscribers-github-workflow

Author: Schuyler Eldridge (seldridge)

Changes

Add wheel publishing in addition to existing source distribution publishing of lit.

Fixes #63369. This also uses the exact fix proposed by @EFord36 in #63369.

I was testing it on my branch (with a further modified version of CI that avoids some of the problematic GitHub Actions steps for a fork and adds debug information about what was built) only to make sure that this produces the expected files. That can be observed here: https://github.com/seldridge/llvm-project/actions/runs/8608056297/job/23589700846#step:7:1 There would now be a lit-18.1.0-py3-none-any.whl in addition to a lit-18.1.0.tar.gz.

My use case for this is slightly different from #63369. I would like to use lit for an internal project. However, the internal project uses a build system which doesn't have support for building source dependencies except when using --no-use-pep517. lit, however, specifies a build-backend in its pyproject.toml which pip treats as explicit opt-in to pep517 even when the command line opt-out is provided.


Full diff: https://github.com/llvm/llvm-project/pull/88072.diff

1 Files Affected:

  • (modified) .github/workflows/release-lit.yml (+1-1)
diff --git a/.github/workflows/release-lit.yml b/.github/workflows/release-lit.yml
index 36b0b6edd518fc..0316ba406041d6 100644
--- a/.github/workflows/release-lit.yml
+++ b/.github/workflows/release-lit.yml
@@ -58,7 +58,7 @@ jobs:
           cd llvm/utils/lit
           # Remove 'dev' suffix from lit version.
           sed -i 's/ + "dev"//g' lit/__init__.py
-          python3 setup.py sdist
+          python3 setup.py sdist bdist_wheel
 
       - name: Upload lit to test.pypi.org
         uses: pypa/gh-action-pypi-publish@release/v1

Copy link
Collaborator

@tru tru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me

@seldridge seldridge merged commit 8a8ab8f into llvm:main Apr 9, 2024
6 checks passed
@seldridge seldridge deleted the dev/seldridge/issue-63369 branch April 9, 2024 15:55
@seldridge
Copy link
Member Author

Thanks for the review @tru.

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Apr 9, 2024
Add wheel publishing in addition to existing source distribution
publishing of lit.

Fixes llvm#63369. This also uses the exact fix proposed by @EFord36 in
llvm#63369.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
(cherry picked from commit 8a8ab8f)
tstellar pushed a commit to llvmbot/llvm-project that referenced this pull request Apr 10, 2024
Add wheel publishing in addition to existing source distribution
publishing of lit.

Fixes llvm#63369. This also uses the exact fix proposed by @EFord36 in
llvm#63369.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
(cherry picked from commit 8a8ab8f)
@pointhex pointhex mentioned this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request to distribution lit tool as a wheel (/'bdist') on Pypi
3 participants