Comments (10)
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.
from cpp-linter-action.
Very cool! So I used a local_scheme
called no-local-version
from cpp-linter-action.
Yep, that's part of the solution. The rest of it is more like
https://github.com/jbms/sphinx-immaterial/blob/bf169751fba59362bcd06da96bfa65b2728cbbae/setup.py#L193-L200
from cpp-linter-action.
In this setup.py, you named the package as "cpp_linter", maybe we called "cpp-linter" better than "cpp-linter-action".
If we called "cpp-linter-action" on pypi, it looks like it's a GitHub action.
For example clang-tools-pip project, the package on pypi we called "clang-tools", not "clang-tools-pip".
from cpp-linter-action.
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.
Please correct me if I am wrong.
from cpp-linter-action.
We (or rather you) will still manage the tags. The setuptools_scm
module will only get the latest tag (via git) and use that as the version number whenever we make a distribution, like so:
python setup.py bdist_wheel
The same happens when we install the pkg from source
python -m pip install .
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 v2.0.0
, and there have been 3 commits since that tagged commit, then the version number used will be v2.0.0.post1.dev3
(translates to 1st "post-release" at 3rd commit since v2.0.0). However, pypi sees v2.0.0.post1.dev3
as a "pre-release", so pip would still install the latest "stable" release (pre-release versions need to be specified explicitly).
from cpp-linter-action.
That sounds great 👍
from cpp-linter-action.
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.
from cpp-linter-action.
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.
from cpp-linter-action.
cpp-linter-action/pyproject.toml
Line 6 in d802afb
I didn't notice the
_
here. You're correct, it should be -
.from cpp-linter-action.
Related Issues (20)
- Improve paths handling HOT 2
- .clang-tidy is not considered HOT 2
- How to specify "Build path" (`-p`) for .clang-tidy? HOT 2
- Option to only post thread comment when errors are detected HOT 14
- Warning: 2 File(s) not formatted (should be 1) HOT 3
- How to make cpp-linter-action work with Conan? HOT 5
- Seperate output for `clang-format` and `clang-tidy` HOT 5
- Python `error: externally-managed-environment` during installation HOT 32
- _pygit2.GitError: repository path '/__w/Waybar/Waybar/' is not owned by current user HOT 6
- [BUG][v2.7.4] _pygit2.GitError: trailing data at line 3734 HOT 12
- Preparing for v2.9.0 PR review feature release HOT 8
- State what python version is used in README HOT 8
- create an examples folder to demonstrate various usage HOT 2
- generate the "Inputs and Outputs" page using action.yml
- cpp-linter workflows runs for every change HOT 9
- Incorrectly added `latest` tag for PR testing and not trigger test action HOT 2
- unexpected `minimun-version` field on latest v2 release HOT 5
- Option to allow acting against different files for clang-tidy and clang-format HOT 4
- MacOS runners fail with clang versions 15-18 HOT 8
- Update "What's New" of v2 in README page HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp-linter-action.