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

Use build over python setup.py bdist_wheel #16

Open
matthewfeickert opened this issue Jun 2, 2022 · 1 comment
Open

Use build over python setup.py bdist_wheel #16

matthewfeickert opened this issue Jun 2, 2022 · 1 comment

Comments

@matthewfeickert
Copy link

Hi. 👋 As you linked your CI/CD in pypa/packaging-problems#595 (comment) I took a look and saw that you install build

- name: Install Build Tools
run: |
python -m pip install build wheel

but then don't use it

- name: Build Distribution Packages
run: |
python setup.py bdist_wheel

As calling python setup.py directly is very deprecated I would suggest (as an internet stranger who is just butting in) that you swap this out for

    - name: Build a wheel and a sdist
      run: |
        python -m build .

    - name: Verify the distribution
      run: twine check dist/*

    - name: List contents of sdist
      run: python -m tarfile --list dist/*.tar.gz

    - name: List contents of wheel
      run: python -m zipfile --list dist/*.whl

(you also don't need to install wheel as build is going to install it in the virtual environment it makes anyway).

cc @lgedgar given that they may want to do a similar thing given their current workflow in pypa/packaging-problems#595 (comment).

(Apologies if you find this annoying or intrusive — not the intent!)

@NeonDaniel
Copy link
Member

Thanks for opening this issue and sorry it missed my inbox and I didn't see it for so long. This has been on my radar to update automations; I have this copy/pasted across many repositories and I didn't pay much attention to those now unused dependencies. I'll keep these suggestions in mind when I get around to rewriting this workflow and then populating it everywhere

@NeonDaniel NeonDaniel added the triage New issue needs review label May 15, 2024
@NeonDaniel NeonDaniel moved this to Low Priority in Community Projects May 15, 2024
@NeonDaniel NeonDaniel removed the triage New issue needs review label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Low Priority
Development

No branches or pull requests

2 participants