Chary Chary wrote:
> ------=_Part_36742_155774922.1709806590845
> Content-Type: multipart/alternative; 
>       boundary="----=_Part_36743_1688509485.1709806590845"
>
> ------=_Part_36743_1688509485.1709806590845
> Content-Type: text/plain; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable


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

  i use virtual environments to isolate various python
projects and installations from each other so there are
three steps to creating a clean version when i'm testing
strange things.  i'm not sure for how long this will be
supported but i like how it's working for me)

  one step is to create the virtual environment and then
the next step is to activate the environment and the third
step is to do all the package installs.  here are the
scripts i use just in case they can help someone else...
(no warranty implied, contents may have settled during
shipping, etc.)...
===== step 1
#!/bin/sh
#
# create virtual environment

ENV_HOME="/home/me/env"
if test ! -d "$ENV_HOME" ; then
  echo "  directory $ENV_HOME does not exist!"
  exit
fi

cd $ENV_HOME

if test ! -d "bc" ; then
  echo "  setting up virtual environment $ENV_HOME/bc"
  python -m venv bc
fi
=====

step 2 is to run the activate command directly as for
some reason it may not work via script at times (maybe
i don't have that path in my environment yet...)

$ alias act_bc='cd ${HOME}/fin/beancount; source ${HOME}/env/bc/bin/activate'
$ act_bc

(to deactivate when done i just run the deactivate
command in whichever environment it is)

=====  step 3
#!/bin/sh
#
# add some things to the virtual environment

ENV_HOME="/home/me/env"
if test ! -d "$ENV_HOME" ; then
  echo "  directory $ENV_HOME does not exist!"
  exit
fi

cd $ENV_HOME

if test ! -d "bc" ; then
  echo "  directory $ENV_HOME/bc does not exist!"
  exit
fi

pip3 install fastnumbers
pip3 install -e ${HOME}/src/github/beancount/beancount
pip3 install petl
pip3 install git+https://github.com/beancount/beanprice
pip3 install autobean-format
=====

  hope this helps.

  fin


> On Wednesday, February 28, 2024 at 9:08:19=E2=80=AFPM UTC+1 [email protected]=
> et wrote:
>
>
> Also, please note that the recommended way to install beancount from git=20
> master is via the pyproject.toml based packaging definition, which uses=20
> meson and meson-python for the build. Installing beancount from git=20
> master with pip uses this build definition. The old setup.py based build=20
> is kept for backward compatibility, but it is not tested (IIRC) and it=20
> is likely to go away (for sure when setuptools will drop support for=20
> setup.py based builds, which is probably not very far in the future).=20
>
>
> Dan,
>
> sorry for coming back on this.
>
> *pip install . *works well both on Linux and Windows, but it installs *bean=
> count=20
> *as a package in /lib/site-packages
>
> But my purpose is to install *beancount *for hacking / developing in python=
>=20
> code.=20
>
> The command  *py setup.py build_ext -i* still works both on Windows and=20
> Linux and all tests pass afterwards (on Linux). So, I am good for now.
>
> Still, can you please suggest the equivalent of    *py setup.py build_ext=
>=20
> -i, *but for pyproject.toml / meson?
>
> It looks like I am not the only one, who has such a question=20
><https://github.com/mesonbuild/meson/issues/6184>
>=20
> Or may be general question: how do I install beancount v3 for hacking /=20
> developing of python code (not the advanced C++ fetures)?
>=20
>
> --=20
> 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 e=
> mail to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/msgid/=
> beancount/c939325a-2737-4916-beae-7dadbf4778c3n%40googlegroups.com.
>
> ------=_Part_36743_1688509485.1709806590845
> Content-Type: text/html; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
><br /><br /><div><div dir=3D"auto">On Wednesday, February 28, 2024 at 9:08:=
> 19=E2=80=AFPM UTC+1 [email protected] wrote:</div><blockquote style=3D"marg=
> in: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-l=
> eft: 1ex;">
><br />Also, please note that the recommended way to install beancount from =
> git=20
><br />master is via the pyproject.toml based packaging definition, which us=
> es=20
><br />meson and meson-python for the build. Installing beancount from git=
>=20
><br />master with pip uses this build definition. The old setup.py based bu=
> ild=20
><br />is kept for backward compatibility, but it is not tested (IIRC) and i=
> t=20
><br />is likely to go away (for sure when setuptools will drop support for=
>=20
><br />setup.py based builds, which is probably not very far in the future).
><br /><br /></blockquote><div><br /></div><div>Dan,</div><div><br /></div><=
> div>sorry for coming back on this.</div><div><br /></div><div><b><font face=
>=3D"Times New Roman">pip install .</font> </b>works well both on Linux and =
> Windows, but it installs <b>beancount </b>as a package in=C2=A0<span style=
>=3D"background-color: rgb(227, 230, 232); color: rgb(12, 13, 14); font-fami=
> ly: ui-monospace, &quot;Cascadia Mono&quot;, &quot;Segoe UI Mono&quot;, &qu=
> ot;Liberation Mono&quot;, Menlo, Monaco, Consolas, monospace; font-size: 13=
> px; white-space-collapse: preserve;">/lib/site-packages</span></div><div><s=
> pan style=3D"background-color: rgb(227, 230, 232); color: rgb(12, 13, 14); =
> font-family: ui-monospace, &quot;Cascadia Mono&quot;, &quot;Segoe UI Mono&q=
> uot;, &quot;Liberation Mono&quot;, Menlo, Monaco, Consolas, monospace; font=
> -size: 13px; white-space-collapse: preserve;"><br /></span></div>But my pur=
> pose is to install <b>beancount </b>for hacking / developing in python code=
> .=C2=A0</div><div><br /></div><div>The command=C2=A0=C2=A0<font face=3D"Tim=
> es New Roman"><b>py setup.py build_ext -i</b>=C2=A0</font>still works both =
> on Windows and Linux and all tests pass afterwards (on Linux). So, I am goo=
> d for now.</div><div><br /></div><div>Still, can you please suggest the equ=
> ivalent of=C2=A0 =C2=A0=C2=A0<font face=3D"Times New Roman"><b>py setup.py =
> build_ext -i, </b>but for=C2=A0</font>pyproject.toml /=C2=A0<span style=3D"=
> font-family: &quot;Times New Roman&quot;;">meson?</span></div><div><span st=
> yle=3D"font-family: &quot;Times New Roman&quot;;"><br /></span></div><div><=
> span style=3D"font-family: &quot;Times New Roman&quot;;">It looks like I am=
>  not the only one, who has <a href=3D"https://github.com/mesonbuild/meson/i=
> ssues/6184">such a question</a></span></div><div><div>=C2=A0</div><div>Or m=
> ay be general question: how do I install beancount v3 for hacking / develop=
> ing of python code (not the advanced C++ fetures)?</div><div>=C2=A0</div></=
> div>
>
><p></p>
>
> -- <br />
> You received this message because you are subscribed to the Google Groups &=
> quot;Beancount&quot; group.<br />
> To unsubscribe from this group and stop receiving emails from it, send an e=
> mail to <a href=3D"mailto:[email protected]";>beancount=
> [email protected]</a>.<br />
> To view this discussion on the web visit <a href=3D"https://groups.google.c=
> om/d/msgid/beancount/c939325a-2737-4916-beae-7dadbf4778c3n%40googlegroups.c=
> om?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgi=
> d/beancount/c939325a-2737-4916-beae-7dadbf4778c3n%40googlegroups.com</a>.<b=
> r />
>
> ------=_Part_36743_1688509485.1709806590845--
>
> ------=_Part_36742_155774922.1709806590845--
>

-- 
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/f7oobk-763.ln1%40anthive.com.

Reply via email to