On 20/11/24 21:31, Chary Chary wrote:
Hi everybody!

I just noticed, that the setup.py has been removed in this commit.

As a result this the "old school" beancount installation for development described in the document is not applicable any longer

==================================

I work with it is the "old school" way; I just build it locally and modify my shell's environment to find its libraries. You build it like this:

cd beancount
python3 setup.py build_ext -i  # or "make build"

and then both the PATH and PYTHONPATH environment variables need to be updated for it like this:

export PATH=$PATH:/path/to/beancount/bin
export PYTHONPATH=$PYTHONPATH:/path/to/beancount

===================================

Question: what is now the "old school" beancount installation for development on Windows?

You can do by hand what the Makefile 'build' target does:

        meson setup --reconfigure build/
        ninja -C build/
        cp build/_parser*.pyd beancount/parser/

Note that for building from source flex and bison are now required. On the CI infrastructure, we install them from MSYS2. I think that the version from winflexbison https://github.com/lexxmark/winflexbison should work too.

However, there is really no reason to stick to the "old school" way of doing things. Just install beancount as an editable wheel. From the source directory, execute:

        python -m pip install meson ninja
        python -m pip install --no-build-isolation -e .

This has the advantage that, if you work on the C code, the extension modules are automatically rebuilt when they are imported. I find this much more convenient than the alternatives.

Cheers,
Dan

--
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/971389e8-c21a-407f-aec2-da1b52ba77b3%40grinta.net.

Reply via email to