Thanks!  Interesting, so it works with setuptools but not pip...

I think I misunderstood the situation with setuptools, thinking it was
deprecated when it sounds like actually it's only direct invocation of
setup.py that's deprecated?  I dunno.  Python dependency and build
management remains fairly mysterious to me.



On Sun, Aug 11, 2024 at 9:09 AM Martin Blais <[email protected]> wrote:

> I couldn't reproduce precisely your error (thanks for precise and hermetic
> steps).
> However, bringing up your setup with venv, I'm seeing other problems that
> are related.
> For example, overriding PYTHONPATH, I was unable to import the *_test.py
> files (!?)
> I traced it down to some library called _beancount_editable_loader that
> seems to mess with importing and it installed in the venv.
> You'll find it here:
>
> beancount-install-test/beancount-venv/lib/python3.12/site-packages/_beancount_editable_loader.py
> It looks like something that is generated by the meson build.
> (I don't know more than that, but it messes with the imports somehow,
> probably via the pth file)
> Maybe Daniele will know - he setup the Meson build - I still work the "old
> skool" way (make build, make test, from repo, with PYTHONPATH).
>
> This modification to your steps will work:
>
>
> mkdir beancount-install-test
> cd beancount-install-test/
> git clone https://github.com/beancount/beancount
> python -m venv beancount-venv
> source beancount-venv/bin/activate
> cd beancount
> python3 -m pip install -U pip
> python3 -m pip install setuptools
> python3 -m pip install regex click python-dateutil pytest
> make build
> make test
>
>
>
>
>
>
>
>
>
> On Sun, Aug 11, 2024 at 12:27 AM Eric Altendorf <[email protected]>
> wrote:
>
>> This is mentioned on another thread, but I'm raising it again here with a
>> report from a hermetic environment.
>>
>> To reproduce the failure:
>>
>> mkdir beancount-install-test
>> cd beancount-install-test/
>> git clone https://github.com/beancount/beancount
>> python -m venv beancount-venv
>> source beancount-venv/bin/activate
>> cd beancount
>> python -m pip install -e .
>> python -m pip install pytest
>> make test
>>
>> produces a bunch of ninja temp file errors of the form:
>>
>> ....
>> ERROR beancount/utils/test_utils.py - FileNotFoundError: [Errno 2] No
>> such file or directory: '/tmp/pip-build-env-o10kn_dq/normal/bin/ninja'
>> ERROR beancount/utils/test_utils_test.py - FileNotFoundError: [Errno 2]
>> No such file or directory: '/tmp/pip-build-env-o10kn_dq/normal/bin/ninja'
>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 79 errors during
>> collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>> ================================================== 79 errors in 2.82s
>> ==================================================
>> make: *** [Makefile:150: test] Error 2
>>
>> I also tried:
>> python -m pip install ninja
>>
>> but I get the same failures after that.
>>
>> There seems to be something very weird with some of the dev mode
>> dependencies.
>>
>> --
>> 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/CAFXPr0t%2BO0ji%2B8AzEv7T2_dqsWGR4F%2BCCtjYzayVrMuTXqDW6A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAFXPr0t%2BO0ji%2B8AzEv7T2_dqsWGR4F%2BCCtjYzayVrMuTXqDW6A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAK21%2BhP%2BAwBQM_Zw0WNDAFOmsp%3DnVoTnUx_dT6GW4dTZVH52kA%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAK21%2BhP%2BAwBQM_Zw0WNDAFOmsp%3DnVoTnUx_dT6GW4dTZVH52kA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAFXPr0uEwB1aaQ91DH9%2BJYnQXJW7VMX4278VM_Mu%2B27u6izdsQ%40mail.gmail.com.

Reply via email to