On 20/11/24 22:08, Daniele Nicolodi wrote:
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

Sorry, I forgot one dependency here. It should be:

        python -m pip install meson-python 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.

Beancount uses meson-python as build system. More details can be found in the meson-python documentation https://mesonbuild.com/meson-python/

--
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/cc6e501b-919d-4538-a67b-e45c2e036c09%40grinta.net.

Reply via email to