tree-sitter-cmake icon indicating copy to clipboard operation
tree-sitter-cmake copied to clipboard

Publishing releases to Pypi

Open pdgendt opened this issue 3 months ago • 6 comments

Could it be possible to publish this grammar to Pypi? Similar to for example tree-sitter-java. It uses a workflow to automate things:

https://github.com/tree-sitter/tree-sitter-java/blob/e10607b45ff745f5f876bfa3e94fbcc6b44bdc11/.github/workflows/publish.yml

pdgendt avatar Oct 03 '25 11:10 pdgendt

It is possible, but I suggest creating a fork and maintain the publish to Pypi there since I don't want to maintain that myself (having to create an account there and managing the token also). However, I know that with pyproject.toml, you can specify the git URL directly, so I don't see a reason for uploading to Pypi.

uyha avatar Oct 03 '25 11:10 uyha

It is possible, but I suggest creating a fork and maintain the publish to Pypi there since I don't want to maintain that myself (having to create an account there and managing the token also). However, I know that with pyproject.toml, you can specify the git URL directly, so I don't see a reason for uploading to Pypi.

Thanks for the fast response! Looking at https://github.com/tree-sitter/workflows it seems most of the work is already done for you? Creating a fork would mean it lags behind the actual source.

But I understand if you don't want to.

pdgendt avatar Oct 03 '25 11:10 pdgendt

Looking at https://github.com/tree-sitter/workflows it seems most of the work is already done for you?

I am talking about having to create accounts and maintain the tokens for each site. Using the workflow is easy and low maintenance, but it is the things that I mentioned that I don't want to deal with.

uyha avatar Oct 03 '25 11:10 uyha

Sorry for piggybacking on this issue, but I have a similar use case, except I'm after a wasm build to be published as an npm package.

@uyha I completely understand - and respect - your reluctance to take on these maintenance responsibilities. It's kind of a thankless job.

To get around the potential version drift, I suppose I could set up either a fork with some kind of automatic sync from upstream or a harness project that clones and rebuilds from this repository,

But it sure would be less messy to do it from here, so before I go ahead with a "workaround" - would you consider taking me on as a co-maintainer to deal exclusively with this part of it? (and perhaps @pdgendt for the PyPI aspect of it, if they are willing)

svjson avatar Oct 10 '25 17:10 svjson

@svjson yeah, sure, I can make you a maintainer. @pdgendt would you like to be a maintainer also for the PyPi front?

uyha avatar Oct 10 '25 18:10 uyha

@svjson yeah, sure, I can make you a maintainer. @pdgendt would you like to be a maintainer also for the PyPi front?

Sure, I don't think there will be a lot of traffic, fine by me 🙂

pdgendt avatar Oct 10 '25 18:10 pdgendt

completed by #43

uyha avatar Nov 24 '25 08:11 uyha