On 31/01/24 22:23, Chary Chary wrote:
> Dan,
>
> I thought that the main idea of beancount v3 was migrating some
> functionality to C++ to make the thing be faster.
>
> If this is not being done in beancount v3, are there any other
> improvements which make it worth using as an opposite to v2 at the moment?
The C++ rewrite has seen significant progress but it has never landed in
a form where it can be used from a beancount application.
The major change in the v3 branch is that beancount.ingest has been
split of and significantly restructured into the beangulp project, that
beancount.query has been split of into the beanquery project and
significantly improved, that the deprecated bean-report and bean-web
functionality have been removed, and several other cleanups. A detailed
list of changes has not been compiled.
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/8e4ad0b7-e480-4cfd-866a-8f995dd424dd%40grinta.net.
If you just want to use Beancount v3 (and not hack on the C++ code) just
install it as a regular Python package. The v3 branch uses meson-python
to build the extension modules and pack them up in a Python wheel.
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/4bb5c6cc-2dcf-4b80-b7b8-28fd770811a2n%40googlegroups.com.
Any way, in python 3.12 there is now new functionality, which allows to re-write the tests in a way that they will work on Windows as well:
The tempfile.NamedTemporaryFile function has a new optional parameter delete_on_close ( gh-58451)
But this is only in 3.12
We will have to wait until you drop support for anything below 3.12?
The reason is that you didn't ask for it to be installed:
python setup.py build_ext -i
only builds the extension modules, it does not install the package or
its dependencies.
Also, please note that the recommended way to install beancount from git
master is via the pyproject.toml based packaging definition, which uses
meson and meson-python for the build. Installing beancount from git
master with pip uses this build definition. The old setup.py based build
is kept for backward compatibility, but it is not tested (IIRC) and it
is likely to go away (for sure when setuptools will drop support for
setup.py based builds, which is probably not very far in the future).
Also, please note that the recommended way to install beancount from git
master is via the pyproject.toml based packaging definition, which uses
meson and meson-python for the build. Installing beancount from git
master with pip uses this build definition. The old setup.py based build
is kept for backward compatibility, but it is not tested (IIRC) and it
is likely to go away (for sure when setuptools will drop support for
setup.py based builds, which is probably not very far in the future).
the man page for pip says which i've been using for
years:
"
-e,--editable <path/url>
Install a project in editable mode (i.e. setuptools "develop
mode") from a local project path or a VCS url.
"
package sources and use the --import-mode=importlib option to run the tests.
Cheers,
Dan
setup virtual environment
In case of Windows go to the x64 Native Tools Command Prompt for VS 20XX
activate virtual environment
install beancount into virtual environment normal way pip install .
go to the virtual environment, locate folder site-packages/beancount/parser
Find the file
_parser.XXXXXX.so - for linux
_parser.XXXXXX.pyd - for window
Copy this file to the source code /beancount/parser
Now pip uninstall beancount
Run the tests normal way: pytest beancount
As I proposed in an earlier message, reading the documentation would be
a good start:
https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html#build-dependencies
The solution is to install ninja on your system, or in the Python
virtual environment:
apt-get install ninja-build
or
python -m pip install ninja
git clone https://github.com/beancount/beancount.git
python3.12 -m venv beancount/venv
. beancount/venv/bin/activate
cd beancount
python -m pip install meson-python meson ninja
python -m pip install --no-build-isolation --editable .
python -m pip install pytest
pytest --import-mode=importlib beancount/
No. The fix is installing ninja in the virtual environment. As I
demonstrated earlier, everything works just fine if you install without
--no-build-isolation. Building with --no-build-isolation is useful only
to the extent to fail immediately if the build dependencies are not
available.
Are you creating your virtual environment in /tmp? It does not seem a
great idea, if you want it to survive a reboot.
How do you install ninja?
I know what that document says, I wrote it.
I am tryiung to install Beancount v3 using Bazel. I have gone through the installation instructions here and i have been stuck in `bazel build //bin:all` command.These errors are kind of cryptic to me, and I have searched and found a lot of tensorflow problems. I couldn't figure out what exactly is the root of the issue.The error is as follows (I have tried using the native fedora python build):