NeonGeckoCom / neon-messagebus-mq-connector

Proxy module for establishing communication between Message Queue based services and Message Bus - based Neon Chat API
Other
0 stars 0 forks source link

Use `build` over `python setup.py bdist_wheel` #16

Open matthewfeickert opened 2 years ago

matthewfeickert commented 2 years ago

Hi. :wave: As you linked your CI/CD in https://github.com/pypa/packaging-problems/issues/595#issuecomment-1145403527 I took a look and saw that you install build

https://github.com/NeonGeckoCom/neon-messagebus-mq-connector/blob/46eeae462116e2e6892c27fbd8f07726c5c1dcc6/.github/workflows/publish_test_build.yml#L22-L24

but then don't use it

https://github.com/NeonGeckoCom/neon-messagebus-mq-connector/blob/46eeae462116e2e6892c27fbd8f07726c5c1dcc6/.github/workflows/publish_test_build.yml#L33-L35

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 https://github.com/pypa/packaging-problems/issues/595#issuecomment-1145403031.

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

NeonDaniel commented 1 year ago

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