pygobject-stubs icon indicating copy to clipboard operation
pygobject-stubs copied to clipboard

Add nix environment and update script

Open jtojnar opened this issue 1 year ago • 8 comments

Nix package manager makes it easy to obtain all the typelibs without having to install them globally. Just run nix-shell (or enter the project directory if you have direnv) and then you will have the libraries available in the environment.

Then you can run tools/update.sh to re-generate all stubs.

jtojnar avatar Feb 11 '24 14:02 jtojnar

Just using this for local development.

jtojnar avatar Feb 11 '24 14:02 jtojnar

Tried regenerating all stubs that worked (GstPbutils generation segfaults) before and after #167 for comparison.

Only two stubs are invalid code (Gst #172 and Gtk3 #169) but that was a pre-existing condition.

jtojnar avatar Feb 11 '24 15:02 jtojnar

you need to use the -o argument, not output to a file.

The current stubs need to be parsed to find all override comments.

lovetox avatar Feb 11 '24 15:02 lovetox

Can you contain the nix stuff to some subfolder, maybe with a README how to use?

Further please separate this MR from updating the files.

lovetox avatar Feb 11 '24 15:02 lovetox

I mostly just opened this to share the diff for #167

It probably does not make sense to merge the Nix environment unless someone else is interested in using it.

jtojnar avatar Feb 11 '24 15:02 jtojnar

I would keep the update.sh though, it makes it easier for people to execute all steps, they can comment out the libs they dont want to update.

lovetox avatar Feb 11 '24 15:02 lovetox

I love the idea of update.sh.

IMHO we should automate this to run every X days, to keep every stub in sync with upstream

matperc avatar Feb 11 '24 16:02 matperc

Opened #174 with the update script.

jtojnar avatar Feb 11 '24 16:02 jtojnar