sillsdev / Mercurial4Chorus

Mercurial version used by Chorus
GNU General Public License v2.0
1 stars 3 forks source link

Linux build of 6.5.1 missing zstd #16

Closed rmunn closed 7 months ago

rmunn commented 7 months ago

14 fixed most missing Mercurial files that were left out of the Linux distribution in #11, but I just found out that it's still missing the zstd package. That's because that package is built from C sources and distributed as a .so file, but I only included Python source files in #14.

The challenge in distributing Mercurial's zstd module in the Mercurial4Chorus NuGet package is that binary files need to be compiled against a specific version of Python: a package compiled for 3.10 won't run on 3.11. (The file is named zstd.cpython-310-x86_64-linux-gnu.so for 3.10, for example). So fixing this is going to require adding a GitHub Actions workflow to compile the binary against multiple versions of Python (currently 3.8 through 3.12, with 3.13 scheduled for release 2024-10-01) then distribute all of those in the NuGet package. Thankfully the compiled .so file is about 500k in size, so including multiple copies of it won't inflate the package size too badly (about 2.5 MB, or 3 MB once Python 3.13 is released).