On 27/02/24 15:38, Chary Chary wrote:
Martin,

thanks!

V3 seems to be working on Windows.

just cloned from github
then py setup.py build_ext -i

For some reason regex module was not auto installed

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).

so I had to pip install it

when I run py -3 -m pytest beancount  a lot of tests fail, but it looks like a lot of them (if not all) are related to this issue https://github.com/beancount/beancount/issues/222

The test suite assumes an unix-like system in many places. The temporary file problem is mostly contained in a few test helpers that would not be too difficult to fix. The other issues are more pervasive and it would be quite a bit of work to fix them all. No one put in the work to do that, so far.

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 fix in Python 3.12 is good to have, but there are other ways to fix this particular issue with the test suite.

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/3bf8c9de-1ed8-441c-9cb5-562ad4b20bcc%40grinta.net.

Reply via email to