Re: invoke-mf2pt1.sh: 7: python: not found

2020-05-10 Thread Jonas Hahnfeld
Am Sonntag, den 10.05.2020, 22:03 +0200 schrieb Han-Wen Nienhuys:
> On Sun, May 10, 2020 at 9:29 PM Jonas Hahnfeld  wrote:
> > Am Sonntag, den 10.05.2020, 14:41 -0400 schrieb Dan Eble:
> > > I'm trying to upgrade the LilyDev Dockerfile to use Ubuntu 20.04 and I 
> > > get this error when I try to build.  It's coming from here:
> > > 
> > > # realpath doesn't exist on OSX
> > > realpath() {
> > >   python -c "import os; print(os.path.realpath('$1'))"
> > > }
> > > 
> > > Is there a Right Way to resolve this?  Should this call python3?  Should 
> > > I change the Docker image, say by creating a symlink?  TIA.
> > 
> > The short-term solution is to install python-is-python3 which will take
> > care of the symlink. Longer term, maybe the script can be made to work
> > without python? I know realpath is horrible in sh, but it could be we
> > can get around it...
> 
> We need python for a host of other things, so dropping it here doesn't
> do much good. Now that we've moved to python 3, is it guaranteed that
> python3 exists?

No, we are only guaranteed that configure found a suitable binary. This
may be in any location, with any name, if the user sets $PYTHON. So if
we really need it, we should use the found interpreter.

But if we can get rid of Python in invoke-mf2pt1.sh, that would be
better IMHO. As far as I understand, we just need an absolute path of
some arguments. We can do this in make already. Alternatively realpath
can be implemented "portably" by (cd $dir && pwd).

Jonas


signature.asc
Description: This is a digitally signed message part


Re: invoke-mf2pt1.sh: 7: python: not found

2020-05-10 Thread Han-Wen Nienhuys
On Sun, May 10, 2020 at 9:29 PM Jonas Hahnfeld  wrote:
>
> Am Sonntag, den 10.05.2020, 14:41 -0400 schrieb Dan Eble:
> > I'm trying to upgrade the LilyDev Dockerfile to use Ubuntu 20.04 and I get 
> > this error when I try to build.  It's coming from here:
> >
> > # realpath doesn't exist on OSX
> > realpath() {
> >   python -c "import os; print(os.path.realpath('$1'))"
> > }
> >
> > Is there a Right Way to resolve this?  Should this call python3?  Should I 
> > change the Docker image, say by creating a symlink?  TIA.
>
> The short-term solution is to install python-is-python3 which will take
> care of the symlink. Longer term, maybe the script can be made to work
> without python? I know realpath is horrible in sh, but it could be we
> can get around it...


We need python for a host of other things, so dropping it here doesn't
do much good. Now that we've moved to python 3, is it guaranteed that
python3 exists?

-- 
Han-Wen Nienhuys - hanw...@gmail.com - http://www.xs4all.nl/~hanwen



Re: invoke-mf2pt1.sh: 7: python: not found

2020-05-10 Thread Jonas Hahnfeld
Am Sonntag, den 10.05.2020, 14:41 -0400 schrieb Dan Eble:
> I'm trying to upgrade the LilyDev Dockerfile to use Ubuntu 20.04 and I get 
> this error when I try to build.  It's coming from here:
> 
> # realpath doesn't exist on OSX
> realpath() {
>   python -c "import os; print(os.path.realpath('$1'))"
> }
> 
> Is there a Right Way to resolve this?  Should this call python3?  Should I 
> change the Docker image, say by creating a symlink?  TIA.

The short-term solution is to install python-is-python3 which will take
care of the symlink. Longer term, maybe the script can be made to work
without python? I know realpath is horrible in sh, but it could be we
can get around it...

Jonas


signature.asc
Description: This is a digitally signed message part


Re: invoke-mf2pt1.sh: 7: python: not found

2020-05-10 Thread Han-Wen Nienhuys
symlink sounds like the fastest solution.

On Sun, May 10, 2020 at 8:42 PM Dan Eble  wrote:
>
> I'm trying to upgrade the LilyDev Dockerfile to use Ubuntu 20.04 and I get 
> this error when I try to build.  It's coming from here:
>
> # realpath doesn't exist on OSX
> realpath() {
>   python -c "import os; print(os.path.realpath('$1'))"
> }
>
> Is there a Right Way to resolve this?  Should this call python3?  Should I 
> change the Docker image, say by creating a symlink?  TIA.
> —
> Dan
>
>


-- 
Han-Wen Nienhuys - hanw...@gmail.com - http://www.xs4all.nl/~hanwen



invoke-mf2pt1.sh: 7: python: not found

2020-05-10 Thread Dan Eble
I'm trying to upgrade the LilyDev Dockerfile to use Ubuntu 20.04 and I get this 
error when I try to build.  It's coming from here:

# realpath doesn't exist on OSX
realpath() {
  python -c "import os; print(os.path.realpath('$1'))"
}

Is there a Right Way to resolve this?  Should this call python3?  Should I 
change the Docker image, say by creating a symlink?  TIA.
— 
Dan