conda-forge / tree_sitter_languages-feedstock

A conda-smithy repository for tree_sitter_languages.
BSD 3-Clause "New" or "Revised" License
0 stars 5 forks source link

Building the tree-sitter binaries for the conda package #9

Open moritzwilksch opened 8 months ago

moritzwilksch commented 8 months ago

Comment:

If I understand correctly, the purpose of the py-tree-sitter-languages package is to provide pre-compiled binaries for a bunch of individual languages. The pypi package uses a (non-standard?) build.py script in CI which compiles these. This conda package does not seem to build these binaries and just mirrors the sdist which - for this particular package - defeats its purpose, right? I think this causes https://github.com/tconbeer/harlequin/issues/420. If this is the case, let's also build the binaries here in conda-forge to provide a functioning conda-installable package. I'd be happy to help if you need me to. Would we do this through a build.sh script or is there also some kind of way to mirror bdist packages from pypi?

thewchan commented 8 months ago

@moritzwilksch maybe we can let @conda-forge/core chime in what the correct protocol here for building additional binaries and including in the final output?

xhochy commented 8 months ago

Yes, call the build.py in build.sh

thewchan commented 8 months ago

Is the strategy here building two outputs? Or sticking with just one? @moritzwilksch if you want to get a head start forking this repo and working on the new recipe please by all means

xhochy commented 8 months ago

@moritzwilksch Do you need any support here or do you know where to start?

moritzwilksch commented 8 months ago

Haven't had the time to start this yet since it's not super urgent for me. Feel free to implement this if you need it asap, otherwise I might get to it on the weekend.

xhochy commented 8 months ago

Not needed on my side, I would rather see you gather some experience here :)

thewchan commented 7 months ago

@moritzwilksch @xhochy any progress on this? I'll leave the version bumps unmerged until we figure this out

moritzwilksch commented 7 months ago

Not yet :(

The build.py uses tree_sitter's Language.build_library(): https://github.com/tree-sitter/py-tree-sitter/blob/565f1654d1849e966c77326e11e65ba6ef530feb/tree_sitter/__init__.py#L94-L122

Maybe this needs some configuration in the python script to find the compiler in the build pipeline? This seems to be the problem according to the logs in #12