On 09/03/24 20:52, Chary Chary wrote:


On Saturday, March 9, 2024 at 6:47:36 PM UTC+1 [email protected] wrote:


    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.


We must have some difference in behavior on our systems, which is interesting to investigate by itself

I use Ubuntu 22.04.4 LTS

I am not a Linux expert, but probably this behavior is to do with how files in the */tmp* are recycled

Are you creating your virtual environment in /tmp? It does not seem a great idea, if you want it to survive a reboot. However, files in /tmp should not be cleaned up (on the time scales involved here, anyway).

I have tested this once again and confirm, that just installing ninja does not help.

How do you install ninja?

You can see attached complete logs where ninja  was installed, but test were still not working without *--no-build-isolation*
  And then started working with.

This also a recommended  setup as per the documentation you kindly pointed me out to

https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html#editable-installs
 
<https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html#build-dependencies>

/The isolated build environment is deleted after the build is completed, resulting in failures when the package in rebuild on import. For these reasons, when installing packages in editable mode, it is recommended to disable build isolation passing the --no-build-isolation argument to pip./

I know what that document says, I wrote it.

Also it the logs you can see, that the error is that the directory */tmp/pip-build-env-t6qnb87w/normal/bin/ninja *Cannot be  found.

This points to the fact that ninja was installed into the temporary build environment. This happens only if meson-python does not find a suitable ninja on the system. How did you install ninja?

However when *--no-build-isolation *is activated, it then points to existing directory

install(
     {'beancount'},
     '/home/evg/code/beancount/build/cp312',
     ['*/home/evg/code/beancount/venv/bin/ninja*'],
     True,
)

Which kind of explains the behaviour.

Which also points to the fact that you installed ninja in your development virtual environment. Sorry, I realize how the instructions I gave you could have been misleading on this point.


--
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/b5be6d6b-9265-46d0-810c-46e31a0de9b4%40grinta.net.

Reply via email to