pycoq icon indicating copy to clipboard operation
pycoq copied to clipboard

Better development setup

Open ejgallego opened this issue 4 years ago • 6 comments

As of now, make does a full python3 setup.py build && pip3 install . ; would be nice if we had a faster workflow, but I have no idea how to it.

ejgallego avatar Sep 23 '21 16:09 ejgallego

I think make has some way of specifying if some file exists, skip this target, but I don't know the Makefile syntax for that off the top of my head. Should be able to piggyback into https://github.com/ejgallego/pycoq/pull/10

quinn-dougherty avatar Nov 05 '21 05:11 quinn-dougherty

The problem is more that we have run pip3 install . , also python3 setup.py seems to be not incremental?

So maybe this issue should be renamed to "incremental python build"

ejgallego avatar Nov 05 '21 11:11 ejgallego

is there an issue with the recommendations here https://github.com/ejgallego/pycoq/issues/1#issuecomment-1165685753? I think that makes sense + during dev doing pip install -e . install in development mode.

brando90 avatar Jun 24 '22 15:06 brando90

How long does pip install -e . takes?

Usually, in OCaml land we don't need to install anything, our tooling recognizes that _build contains artifacts and acts accordingly. This, with build caches, makes dev very fast.

To give a reference, serapi usually is in the sub 1 s build for me.

ejgallego avatar Jun 24 '22 15:06 ejgallego

good questions. The normal pip install does install the dependencies and if they are there already it uses them (so caching). So I guess the dependencies are compiled under the good. The -e is for the actual library you are currently developing only afaik and allows you to edit that library and have running the file working as normal even if you change it. Its a way to make the compiled code editable (as if it were interpreted I guess) but I have no idea how this magic works under the hood. I do think pip install -e . is quite standard though.

brando90 avatar Jun 24 '22 18:06 brando90

Thanks for the info @brando90 . I think we need to look at projects that use python to access some C library, that's exactly what we are doing here (we expose Coq as a C library)

ejgallego avatar Jun 27 '22 12:06 ejgallego