-
Notifications
You must be signed in to change notification settings - Fork 21
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 setuptools_scm during install #77
Comments
So I guess after this changes when we draft or create a new release, there is a release workflow can automatically update version from setup.py, commit the changes, build and upload the package to pypi then tag the latest commit to v1. |
We (or rather you) will still manage the tags. The
The same happens when we install the pkg from source
If we build or install on a non-tagged commit, then the latest tag will be appended with info to show the difference between releases. For example: If the latest tag is |
That sounds great 👍 |
I have used setuptools_scm in clang-tools-pip, and released the package to PyPI automatically. No longer need to manually update the version in setup.py. |
Pretty cool isn't it? I can make some modifications so that we can publish pre-releases to test-pypi... Pypi (& test-pypi) don't like it when the version name/number uses part of the commit sha. By default, setuptools_scm uses the commit sha in the version if the commit is not a tagged commit. |
Very cool! So I used a |
Yep, that's part of the solution. The rest of it is more like |
I've got this working the same as it is in clang-tools-pip project. @shenxianpeng should we be publishing to pypi using the name "cpp-linter-action"? I currently have it set to "cpp-linter", but I'm afraid that might be confused with cpplint. |
In this setup.py, you named the package as "cpp_linter", maybe we called "cpp-linter" better than "cpp-linter-action". For example clang-tools-pip project, the package on pypi we called "clang-tools", not "clang-tools-pip". |
cpp-linter-action/pyproject.toml Line 6 in d802afb
I didn't notice the _ here. You're correct, it should be - .
|
I've been trying to hold off on this because it will slow the installation of this action in the docker env. But, If we decide to start distributing the python executable script to pypi, then using setuptools_scm will automatically update this action's version during install.
Uploading bdist_wheels to pypi will make installing via pip a little quicker, and this action's version number will be already set when the wheel is uploaded to pypi.
The text was updated successfully, but these errors were encountered: